VSCode java app launch failed with externalTerminal

Viewed 375

how can I launch a spring boot app from VSCode with "terminal.external.osxExec": "Terminal.app" or better "terminal.external.osxExec": "iTerm.app" ?

All my attempts failed due to VSCode cut the command line after 1024 chars and the message Failed to launch debuggee in terminal. Reason: com.sun.jdi.connect.TransportTimeoutExceptionis shown.

If I use those settings mentioned in the VSCode docs, VSCode launches the external process. The window (terminal or iterm) shows the usually welcome lines (Last Login ... / You have mail .. etc.) Then the first 1024 chars of a kind of command line VSCode uses to start the application are shown. But due to environment variables, 1024 chars are far too little for the whole command. VSCode can use the @argfile settings for modern java cmd's but, those argfiles contains arguments for the java application itself. This is not the problem here... it's the amount of the ENVs. The maximum length limit on my command line is 262144 chars determined with echo "%$(getconf ARG_MAX)s".

If I should reduce the amount of environment variables, how VSCode determine, which ENVs are used for the startup command line ? I've tried to reduce the ENVs used by the Terminal.app to under 1024 chars. Then I started code from within this shell by using code with . But every subsequent launch of my application under development from within VSCode with settings "terminal.external.osxExec": "Terminal.app", uses the Terminal.app but with different ENVs, not those one I've set before ?

0 Answers
Related