How do I enable console output? #117
-
|
When trying to execute package.json scripts on nvim-dap with the following configuration: {
type = "pwa-node",
request = "launch",
name = string.format("Run script: %s", name),
cwd = "${workspaceFolder}",
env = {
NODE_OPTIONS = "--inspect",
},
runtimeExecutable = pm,
runtimeArgs = { "run", name },
resolveSourceMapLocations = { "${workspaceFolder}/**", "!**/node_modules/**" },
sourceMaps = true,
skipFiles = { "<node_internals>/**", "node_modules/**" },
}I get no console output. Is there any way for me to modify this so it works? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Olá,
That's a great question, actually. The short answer is that you can't get the output in the console, but rather in the REPL. That happens because the js-debug-adapter is full of quirks to handle multiple sessions. There's a root session, which then creates another session, to spawn the command that is specified in the configuration (e.g., for the configuration you provided, the But notably, these child sessions do not have an assigned terminal (the js-debug-adapter does not request one), which means that the "console view" (or anything, really) can't display the output for that specific process. The way the js-debug-adapter deals with that is by sending the output of every session to the REPL. Additionally, the naming can be a bit confusing. Within nvim-dap, the REPL is what's usually referred to as the "Console" (i.e., browser console). And nvim-dap-view's "console view" is meant to show the terminal associated with the current session. |
Beta Was this translation helpful? Give feedback.
Olá,
That's a great question, actually. The short answer is that you can't get the output in the console, but rather in the REPL.
That happens because the js-debug-adapter is full of quirks to handle multiple sessions. There's a root session, which then creates another session, to spawn the command that is specified in the configuration (e.g., for the configuration you provided, the
package.jsonscript is run). If the command then spawns another process, a new session is also created and so on.But notably, these child sessions do not have an assigned terminal (the js-debug-adapter does not request one), which means that the "console v…