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

Debugger does not stop on the breakpoints

Open konste opened this issue 5 years ago • 5 comments
trafficstars

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 avatar Dec 25 '19 02:12 konste

@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?

konste avatar Jan 13 '20 14:01 konste

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.

thomasvl avatar Jan 13 '20 14:01 thomasvl

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.

konste avatar Jan 13 '20 16:01 konste

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 avatar Jan 22 '20 18:01 JayBazuzi

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():

  • Slashes must be /. The Skylark debugger should learn to canonicalize path slashes / compare paths in a platform-appropriate way.

  • The path (or maybe just the drive letter?) must have the correct casing. The Skylark debugger should learn about path case-insensitivity.

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

JayBazuzi avatar Jan 24 '20 19:01 JayBazuzi