Closed cdaringe closed 2 years ago
Further debugging showed me that I could use:
const uri = vscode.window.activeTextEditor.document.uri;
to acquire a Uri
!
i wasn't able to fully get into a debugging state yet though.
I'm trying to debug a local version of the jsoo compiler, a la:
{
"name": "js_of_ocaml.bc",
"type": "ocamlearlybird",
"request": "launch",
"stopOnEntry": true,
"yieldSteps": 4096,
"arguments": ["compile", "/tmp/dummy.ml"],
"program": "/Users/myuser/src/js_of_ocaml/_build/default/compiler/bin-js_of_ocaml/js_of_ocaml.bc",
},
but:
arguments
yet? i did ocamlearlybird --help
, and it suggested not (haven't checked the src yet)thanks for your time!
This command is not designed to manually call it in command plates. It is used to implement context menu on bytecode file. And if you debug in this way. You will lost the chance to specify arguments to debuggee program.
The recommended way is using launch configuration to debug. Just click the start debug button in debug pannel or press F5.
Thanks for the feedback.
I can certainly use the other methods.
However, if it is not supported from command palette, why register the command?
"contributes": {
"commands": [
{
"command": "ocamlearlybird.startDebug",
"title": "Start an OCaml Debug Session"
},
Any reason to not support it? I can send the PR :)
If it's explicitly forbidden, one could remove it from the palette, but i think it would be quite nice to have a executable file open and jump right into a debug session!
not critical though
Vscode context menu api requires that. I didn't know there's option to hide command from command plate while I was developing this extension.
---Original--- From: "Christopher @.> Date: Sun, Oct 31, 2021 07:10 AM To: @.>; Cc: @.**@.>; Subject: Re: [hackwaly/ocamlearlybird] Start an OCaml Debug Session renderserror (Issue #34)
Thanks for the feedback.
I can certainly use the other methods. However, if it is not support from command pallete, why register the command? "contributes": { "commands": [ { "command": "ocamlearlybird.startDebug", "title": "Start an OCaml Debug Session" },
Any reason to not support it? I can send the PR :)
— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
problem
ctrl+shift+p
and attempting to start a session yields a pop up error.research
jumping into the extension host logs shows:
by editting the JS, i discovered that
uri
is not defined:https://github.com/hackwaly/ocamlearlybird/blob/7f41c13d6906edeef5ed1c353927aaab94ed178d/integrations/vscode/extension.js#L70-L71