bazel-contrib / vscode-bazel

Bazel support for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=BazelBuild.vscode-bazel
Apache License 2.0
238 stars 77 forks source link

Debugger does not stop on the breakpoints #167

Open konste opened 4 years ago

konste commented 4 years ago

When I set breakpoints in .bzl files and go for "Build Target with Starlark Debugger" - it just runs the build, but does not stop on the breakpoints. Debug Console is all green (INFO: Debugger connection successfully established. ...), so no errors - it just does not work.

vscode-bazel 0.3.0, Bazel 2.0.0, VSCode: 1.41.1, Host: Windows 10 x64

Any troubleshooting tips?

konste commented 4 years ago

@thomasvl May we get some attention to this issue, pretty please? It really makes Bazel adoption unnecessarily hard for us. At least initial diagnostics would be already helpful. If it is something difficult we stop pursue it and look for a different IDE. But may be it is something relatively easy to fix or workaround?

thomasvl commented 4 years ago

I don't have a windows machine, so there isn't much I can do here. Some with the setup is going to have to dig into it and contribute what they find.

konste commented 4 years ago

Thomas, would it help at all if I get you remotely accessible Windows VM? Of course, I will keep looking for the other options, but would that be one of the options by any chance? I am getting kind of desperate.

JayBazuzi commented 4 years ago

In this code, shouldn't we be setting response.body? https://github.com/bazelbuild/vscode-bazel/blob/master/src/debug-adapter/client.ts#L269

Compare to: https://github.com/microsoft/vscode-mock-debug/blob/master/src/mockDebug.ts#L175

Or am I missing something?

JayBazuzi commented 4 years ago

I have managed to hit a breakpoint on Windows. There are multiple issues which I am continuing to investigate. One is #176 .

Two others about how a location is passed to skylark_debugging.Breakpoint.create():

I have opened https://github.com/bazelbuild/bazel/issues/10654 about fixing that in the debugger itself.