Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jdt-debug-dev] JSR 45 status and plugin/debugger documentation

Daniel Bonniot wrote:

From the JDI information, the source locator knows the (unqualified) file name, in this case "main.nice". This is in a class pkg.fun, so from this it can know that the source should be in a directory "pkg". So it could infer the relative file name "pkg/main.nice". It could then look for this file the sourcepath.
Isn't this a good default, language independent behaviour?

To elaborate a bit on this, let me quote JSR 45:

 - The source path must be set-up to include translated-source directories
 - Source must be placed in a directory corresponding to the package

To me, this means that when JDI returns an unqualified source file name, the debugger should look up the source as a file of that name, in a subdirectory of the sourcepath entries corresponding to the current package.

I can confirm that jdb in JDK 1.4.1 does just that. This part does not seem to need to be language dependent.

I'm not saying that there should not be any language-dependent interaction with the debugger core (I suppose this would be needed for setting breakpoints anyway). But it would still be nice to have as much standard behaviour from the debugger as possible, so that code needs not to be duplicated in many plugins.

Daniel




Back to the top