svaante / dape

Debug Adapter Protocol for Emacs
GNU General Public License v3.0
477 stars 31 forks source link

:console integratedTerminal option with vscode-js-debug no longer works #60

Closed timcharper closed 8 months ago

timcharper commented 8 months ago

After upgrading from dape 0.2.0 to dape 0.5.0, the option :console "integratedTerminal" no longer works. The option internalConsole (which does not cause the error) does not let me see the STDOUT/STDERR of the process I am testing.

When I use :console "integratedTerminal", I get this error from dapDebugServer

TypeError: Cannot read properties of undefined (reading 'processId')
    at new t (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:131:38022)
    at El.launchProgram (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:136:430)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async n (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:133:4088)
    at async _l.launch (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:131:30729)
    at async eb.captureLaunch (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:136:9297)
    at async eb._launch (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:136:9044)
    at async Promise.all (index 3)
    at async eb._boot (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:136:8168)
    at async Server.<anonymous> (/home/tim/.emacs.d/debug-adapters/js-debug/src/dapDebugServer.js:142:3662)

Screen recording:

https://asciinema.org/a/truxou1bEXoZSoxMjDvXMkYLN

timcharper commented 8 months ago

Setting :outputCapture "std" redirects output to the repl, which is good enough for me.

Go ahead and close, unless this is something that you expected to continue working?

svaante commented 8 months ago

Hi, would you be great if you could share configuration and a minimal js code example for me to test with.

timcharper commented 8 months ago

Hey svaant, I've got a repro in a single org doc

Go ahead and clone it in a folder and eval the blocks in sequence to reproduce:

git clone https://gist.github.com/b61ea34a71eded1b5f5ce44d8cdde7ae.git js-debug-repro
svaante commented 8 months ago

45f9ae5 should fix the issue, thank you for the gist it was super helpful. Please get back to me if it's fixed

timcharper commented 8 months ago

image

That did it!

Thank you so much @svaante ! :)