[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-compiler-dev
Subject:    Re: RFR: JDK-8266877: Missing local debug information when debugging JEP-330
From:       Jonathan Gibbons <jjg () openjdk ! java ! net>
Date:       2021-05-28 4:19:09
Message-ID: jbQkKvuxcmRmIhGLlwW69JZrwS90OqGIPLR2h0o9SHw=.67294d27-35a1-4fa5-a74f-e83937d3de99 () github ! com
[Download RAW message or body]

On Sun, 9 May 2021 15:51:29 GMT, Jaroslav Tulach \
<github.com+26887752+JaroslavTulach@openjdk.org> wrote:

> I am polishing support for [JEP-330](https://openjdk.java.net/jeps/330) in NetBeans \
> ([PR-2938](https://github.com/apache/netbeans/pull/2938)) and I have problems with \
> debugging. Local variables aren't visible as the compiler doesn't pass `-g` option \
> when compiling the main class. I'd like to see  
> ![obrazek](https://user-images.githubusercontent.com/26887752/117578440-a876e000-b0ee-11eb-85b6-3c998f71879f.png)
>  
> however, that requires one to pass `-g` option to the compiler somehow. As far as I \
> can say there is no such way and hence I decided to create this pull request. If I \
> invoke: 
> $ java -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y x.java
> 
> it detects JDWP is on and adds `-g` to the compiler arguments. Is this an \
> acceptable improvement? The alternative is to avoid using JEP-330 when debugging \
> and rather generate `.class` by invoking `javac` and then run it as usual, but I'd \
> rather rely on JEP-330 and avoid creation of the `.class` file.

Marked as reviewed by jjg (Reviewer).

-------------

PR: https://git.openjdk.java.net/jdk/pull/3939


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic