-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breakpoints not hit when using WSL #5
Comments
I guess the If you want to debug with ocamlearlybird in debug server mode. Add
First, you need start earlybird in server mode at port 4711 separated.
Then you can press F5, to debug your ocaml bytecode with ocamlearlybird debug server. |
Thank you for getting back to me so soon 😄 Sorry - I copied the wrong launch json, I have been using the When doing the same thing, except that VSCode is running in the Ubuntu instance in WSL, I get the breakpoints hit. I tried the |
How did you get your bytecode runs without crash the debug server? I've tested in my VM, it crash the debug server, because earlybird in WSL doesn't handle windows style path.
|
I'm using the WSL workspaceFolder extension, and have added this into my launch json: "windows": {
"program": "${command:extension.vscode-wsl-workspaceFolder}/main",
}, |
The same problem with me. I have a project in wsl2, the debugger skipped any breakpoints, just run normally and exit, the stopOnEntry is worked. {
"name": "OCaml earlybird (experimental)",
"type": "ocaml.earlybird",
"request": "launch",
"program": "${workspaceFolder}/analysis/_build/default/src/Cli.bc",
"arguments": [
"test",
"./tests/src/Pipe.res"
],
"cwd": "${workspaceFolder}/analysis",
"env": {
"LD_LIBRARY_PATH": "${workspaceFolder}/analysis/_build/default/vendor/ext"
},
"stopOnEntry": true,
"console": "integratedTerminal",
"onlyDebugGlob": "<${workspaceFolder}/**/*>",
"yieldSteps": 1024,
} |
I've been trying to get this to work with WSL under Windows 10, using OCaml 4.04.2, Opam 2.0.1, and the latest version of VSCode.
I got Opam 2 working on WSL by using
opam init --disable-sandboxing
, and the earlybird server runs without issue, though when I try to pause at a breakpoint nothing happens - the program successfully runs, exits and outputs in the debug console, and the earlybird server stays running.However, if I run VSCode within WSL using a running X server, it will successfully stop on the provided breakpoints. I wonder if there is something I am doing wrong in the Windows setup?
Any pointers you have would be much appreciated!
My
main.ml
file:My launch task (in
launch.json
):My build task (in
tasks.json
):My makefile:
The text was updated successfully, but these errors were encountered: