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

Watch view doesn't show red for error message sometimes. #48468

Closed
andxu opened this issue Apr 24, 2018 · 8 comments
Closed

Watch view doesn't show red for error message sometimes. #48468

andxu opened this issue Apr 24, 2018 · 8 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Milestone

Comments

@andxu
Copy link

andxu commented Apr 24, 2018

  • VSCode Version: 1.22.2
  • OS Version: Win10 64Bit

Steps to Reproduce:

  1. Install vscode-java-debug plugin, and start the debug and evaluate a bad expression, the error message should be shown in red, but actually it sometimes shows white:
    img

While debugger gives vscode the following reponse:

 {"success":false,"message":"Constructor of a local type cannot be used in an evaluation expression","request_seq":17,"command":"evaluate","body":{"error":{"id":1000,"format":"Constructor of a local type cannot be used in an evaluation expression"}},"seq":24,"type":"response"}
@vscodebot
Copy link

vscodebot bot commented Apr 24, 2018

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@isidorn
Copy link
Contributor

isidorn commented Apr 24, 2018

@andxu what does "sometimes" mean? Can you please file this with reproducable steps?
Can you also reproduce this when you debug plain javascript?
Do you see value.unavalable.error when you inspect that element?

inspect

@isidorn isidorn added info-needed Issue requires more information from poster and removed feature-request Request for new features or functionality labels Apr 24, 2018
@andxu
Copy link
Author

andxu commented Apr 25, 2018

image
image

@andxu
Copy link
Author

andxu commented Apr 25, 2018

Sometime it works fine:
image

@andxu
Copy link
Author

andxu commented Apr 25, 2018

bad
normal

@andxu
Copy link
Author

andxu commented Apr 25, 2018

Steps to repro:

  1. install java debugger extension,
  2. Open a folder, create a new BreakpointTest.java, and fill in the code:
class A {

    void m() {
        System.out.println("outer");
    }

    String n() {
        return "outer";
    }
}

public class BreakPointTest {
    public static void main(String[] args) {
        new BreakPointTest().go();
        int j = 0;
        new A() {
            @Override
            void m() {
                System.out.println("anonymous");
            }
        }.m();
        for (int i = 1; i <= 100; i++) {
            if (i <= 99) {
                j++;
            } else {
                System.out.println(j);
            }

        }
    }

    void go() {
        new A().m();
        class A {
            String n() {
                return "inner";
            }

            void m() {
                System.out.println("inner");
            }
        }
        new A().m();
    }

    static class A {
        String n() {
            return "middle";
        }

        void m() {
            System.out.println("middle");
        }
    }
}
  1. add a watch on new A().n(), and set 2 breakpoints and then Press F5 and F5 again to hit two breakpoints.

@isidorn isidorn added this to the May 2018 milestone Apr 25, 2018
@isidorn isidorn added bug Issue identified by VS Code Team member as probable bug and removed info-needed Issue requires more information from poster labels May 9, 2018
@isidorn
Copy link
Contributor

isidorn commented May 9, 2018

@andxu I have pushed a potential fix for this. Please try the vscode insiders tomorrow and let us know if this fixed the issue on your end

@isidorn isidorn closed this as completed in 2b1f891 May 9, 2018
@weinand
Copy link
Contributor

weinand commented May 31, 2018

@andxu have you been able to verify that our fix works?

@sbatten sbatten added the verified Verification succeeded label Jun 1, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Jun 23, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug debug Debug viewlet, configurations, breakpoints, adapter issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

4 participants