microsoft / microsoft/java-debug

SourceLookup fails for dependencies

Open
#100 3 comments 0 reactions 1 assignee View on GitHub

@testforstephen is already working on this.

Since Nov 17, 2017.

ai-triaged bug needs more info
Dominant language
Java
Stars
409
Forks
204
Avg merge
1d 13h
Merged PRs (30d)
4

Description

Setting a breakpoint to a file from a dependency fails on source lookup.

In my gradle project I have dependency to compile group: 'xerces', name: 'xercesImpl', version:'2.11.0 and I am trying to set a breakpoint on 'org.apache.xerces.parsers.DomParser.parse()' which is located on this dependency. I can browse to the file through vscode and see the code but when I try to set the breakpoint it fails with the below stacktrace.

[Error - 12:12:00] 13-Nov-2017 12:10:58 PM DebugSession dispatch exception: java.lang.IllegalStateException: Java Model Exception: Java Model Status [/Users/gercan/.m2/repository/xerces/xercesImpl/2.11.0/xercesImpl-2.11.0.jar is not on its project's build path]
	at org.eclipse.jdt.internal.core.JavaElement.newJavaModelException(JavaElement.java:570)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:247)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:505)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:241)
	at org.eclipse.jdt.internal.core.Openable.openAncestors(Openable.java:505)
	at org.eclipse.jdt.internal.core.Openable.generateInfos(Openable.java:241)
	at org.eclipse.jdt.internal.core.JavaElement.openWhenClosed(JavaElement.java:583)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:320)
	at org.eclipse.jdt.internal.core.JavaElement.getElementInfo(JavaElement.java:306)
	at org.eclipse.jdt.internal.core.Openable.getBuffer(Openable.java:285)
	at org.eclipse.jdt.internal.core.AbstractClassFile.getBuffer(AbstractClassFile.java:212)
	at org.eclipse.jdt.internal.core.AbstractClassFile.getSource(AbstractClassFile.java:324)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:1131)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:815)
	at com.microsoft.java.debug.plugin.internal.JdtSourceLookUpProvider.getFullyQualifiedName(JdtSourceLookUpProvider.java:140)
	at com.microsoft.java.debug.core.adapter.handler.SetBreakpointsRequestHandler.convertClientBreakpointsToDebugger(SetBreakpointsRequestHandler.java:119)
	at com.microsoft.java.debug.core.adapter.handler.SetBreakpointsRequestHandler.handle(SetBreakpointsRequestHandler.java:83)
	at com.microsoft.java.debug.core.adapter.DebugAdapter.dispatchRequest(DebugAdapter.java:80)
	at com.microsoft.java.debug.core.adapter.ProtocolServer.dispatchRequest(ProtocolServer.java:66)
	at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.processData(AbstractProtocolServer.java:166)
	at com.microsoft.java.debug.core.protocol.AbstractProtocolServer.start(AbstractProtocolServer.java:80)
	at com.microsoft.java.debug.core.adapter.ProtocolServer.start(ProtocolServer.java:53)
	at com.microsoft.java.debug.plugin.internal.JavaDebugServer$2.run(JavaDebugServer.java:136)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.