Open mawkler opened 2 years ago
Hi @melkster ,
Thanks for reaching out to me. Unfortunately I'm not sure what the root cause is, but I can give you my own configuration:
dap.adapters.node2 = {
type = 'executable',
command = 'node',
args = {os.getenv('HOME') .. '/apps/node/out/src/nodeDebug.js'}, -- adjust the path!
}
Could you kindly try it out with this config?
Thanks and best regards, David
@David-Kunz I think I found the problem: the debugger tries to run ~/node_modules/.bin/jest
even though my workspace, or Neovim's cwd isn't in my home directory. If I first navigate to the project's working directory and then open Neovim the correct Jest path is used. So is there a problem with how Jester computes Neovim's current working directory?
Now I also get another weird behaviour when using your config: After setting a breakpoint and doing require"jester".debug()
I get the error message "Breakpoint ignored because generated code not found (source map problem?).", but after maybe one second DAP starts working and I see DAP stopping at my breakpoint as intended.
I'm guessing that the first problem is here since cwd
only gets computed once when jester is loaded.
Hi @melkster,
"Breakpoint ignored because generated code not found (source map problem?)."
Yes, I also get this warning sometimes (even though everything works). This seems to be a problem with nvim-dap
, you can open an issue there if it bugs you too much.
since cwd only gets computed once when jester is loaded.
Oh thanks for the hint! I fixed it: https://github.com/David-Kunz/jester/commit/5b66eb7ac3ed1cb9369cb7e556baef1fd48dc1b5
Best regards, David
Ok, thank you!
Hi @melkster ,
I followed the discussion and saw that the default configuration seems to be wrong, I fixed that in the newest version of Jester
.
Thanks for the report and best regards, David
After updating, the error message seems to have changed to "Breakpoint set but not yet bound". Also, the "No active session" message still is printed when I do require('jester').debug()
:thinking:
Thanks @melkster , I'll have a look.
I have same issue.:-(
I'm having this problem too.
@David-Kunz @dimas-cyriaco @gxbsst hey! I hope you are doing well.
Removing the cwd
option from dap
config resolved the problem for me. Have you tried that?
Hi! When I run
require"jester".debug()
on a jest test I get the message "No active session". If I runrequire"jester".debug_file()
nothing happens. Do you know what I could be doing wrong?Here's a link to my dap/jester configuration.