Skip to content

Debug console will hangs on java exception text #719

Description

When running java application and it's output is redirected to debug console, this output will just hang on exception and no other output will be printed from application.

Environment
  • Operating System: Windows 7
  • JDK version: JDK8
  • Visual Studio Code version: 1.40.1 (tested on insider too)
  • Java extension version: 0.53.1
  • Java Debugger extension version: 0.23.0
Steps To Reproduce
  1. Install clean VS code insider
  2. Install Java extension pack
  3. Load java application below
  4. Redirect console output to "internalConsole" via launch.json and launch main method
  5. Debug console will show only two first lines, then hangs.

Application to reproduce - will just print this exception instead of raising it, result is the same.

public class TestApplication {
    public static void main(String[] args) {
        System.out.println("Exception in thread \"main\" java.lang.IllegalArgumentException: failed");
        System.out.println("	at TestApplication.main(TestApplication.java:7)");
        System.out.println("	at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:363)");
        System.out.println("	at TestApplication.main(TestApplication.java:7)");
    }
}
Current Result

Debug console will show only two first lines, then hangs.

Expected Result

Debug console will show all lines and continue to print next messages (if any).

Additional Informations

Some other exceptions will print just OK, it seems that somehow the code which is trying to determine in which file this exception happened will crash when it encounters static class (with dollar character) or non-existing file/class in exception text (at ).

Peviously submitted to vscode at:

microsoft/vscode#84061

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions