bazel-stack-vscode icon indicating copy to clipboard operation
bazel-stack-vscode copied to clipboard

When running Starlark Debug Server, it reminds: connection error: proto: cannot parse invalid wire-format data

Open wulixzCN opened this issue 3 years ago • 1 comments

My configurations is : {type : starlark, request: attach, debugServer: 4711} After running command 'build //cmd/gencopy --experimental_skylark_debug ' and 'bzl debug adapter' successfully, I try to debug following the video : https://www.youtube.com/watch?v=MAXJA8Gbtxk

it reminds: it reminds: connection error: proto: cannot parse invalid wire-format data image

How to fix it, I have no idea ^_^

wulixzCN avatar May 21 '22 09:05 wulixzCN

I am coding with Starlark language recently and try to use Starlark debug tools to debug Starlark program.

  1. When running Starlark Debug Server, it reminds that ‘connection err: photo: cannot parse invalid wire-format data’ My configuration is: { "version": "0.2.0", "configurations": [{ "type": "starlark", "request": "attach", "debugServer": 4711, "name": "Attach to a running Starlark Debug Server" }] }

Before running it. I download your “rules_proto" project and run the following two commands in two different terminal.

  1. bazel build //cmd/gencopy --experimental_skylark_debug Starting local Bazel server and connecting to it…

  2. bzl debug adapter --make_default_workspace_content=false --address 127.0.0.1:4711 INFO[0000] Debug adapter listening on 127.0.0.1:4711
    INFO[0010] Accepted connection from 127.0.0.1:64541
    Trying to connect to a Starlark server at localhost:7300... Connected INFO[0091] No more data to read: EOF
    INFO[0091] Closing connection from 127.0.0.1:64541

  3. When I adjust the configuration attach to launch { "version": "0.2.0", "configurations": [ { "type": "starlark", "request": "launch", "name": "Attach to a running Starlark Debug Server", "targetLabel": "//cmd/gencopy" // "targetLabel":"${workspaceFolder}/${command:bsv.bzl.askForDebugTargetLabel}" }] }

The debugger running without reminder, but the icon looks like that. image

And I already set lots of breakpoints By searching lots of documents, I cannot find out the result.

wulixzCN avatar May 23 '22 05:05 wulixzCN