Skip to content

Watch expressions don't evaluate when test launched from debug code lens #573

@shawmanz32na

Description

@shawmanz32na

None of my debugging watch expressions are evaluating when running my test(s) using the "Debug Test" code lens, claiming Cannot evaluate because of java.lang.IllegalStateException: Cannot evaulate, please specify projectName in launch.json. This occurs when debugging from the test class' lens and when debugging from the test method's lens.

image

I'm not sure if error represents the root cause of the issue, as I didn't think the "Debug Test" code lens used a launch configuration from launch.json. In my project, at least, there is only one entry in launch.json, and it's an "Attach" configuration. As this is a Maven project, I've never before configured launch.json to launch a debug session for JUnit tests, and am therefore unable to verify if this is isolated to the "Debug Test" code lens or if it's a wider-spread problem.

I'm hoping this doesn't require a sample project to be able to reproduce, but I found this when running in a multi-project workspace, in a multi-module Maven project that leverages JUnit 5.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions