Skip to content
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

Live process is not auto connected when app is launched in internalConsole #794

Closed
Eskibear opened this issue Jun 27, 2022 · 2 comments
Closed
Assignees
Labels

Comments

@Eskibear
Copy link
Contributor

When a spring app is launched with "console": "internalConsole", live process is not auto connected.

In such case, I observe below details:

Java debugger reported correct processId:

{"event":"processid","body":{"processId":5952,"shellProcessId":-1,"type":"processid"},"seq":2,"type":"event"}

In debug console we have below error thrown by sts-vscode:

rejected promise not handled within 1 second: Error: No child process found for parent shell process with pid = -1

stack trace: Error: No child process found for parent shell process with pid = -1
    at c:\Users\<username>\.vscode-insiders\extensions\pivotal.vscode-spring-boot-1.36.0\out\lib\debug-config-provider.js:123:19
    at Generator.next (<anonymous>)
    at fulfilled (c:\Users\<username>\.vscode-insiders\extensions\pivotal.vscode-spring-boot-1.36.0\out\lib\debug-config-provider.js:28:58)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

Currently the workaround is either of the following options:

  • Manually connect to the process.
  • Use "integratedTerminal" to launch the app.

Since java-debugger extension has already provided processId, it would be better to cover this case.

@Eskibear
Copy link
Contributor Author

Looks like it's inspecting the wrong field.

async function getAppPid(e: ProcessEvent): Promise<number> {
if (e.pid) {
return e.pid;
} else if (e.shellProcessId) {

{
 shellProcessId: number  /* The process ID of the terminal shell if the process is running in a terminal shell.  */
 processId: number /* The process ID. */
}

From microsoft/java-debug#413 (comment)

And AFAIK java-debugger extension now calculates processId on its own, covering various kind of terminals like cygwin/mingw, WSL, etc. It would probably be fixed by renaming pid to processId in L91?

@BoykoAlex
Copy link
Contributor

@Eskibear Thanks for bringing this up! Should be fixed now: f5f0dcb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants