basic app debug problem with source not found

268 views
Skip to first unread message

bord

unread,
Jan 29, 2012, 1:33:27 PM1/29/12
to Scala IDE User
am trying out the eclipse indigo (latest from mid january) and also up
to date on scala plugin (as well as subclipse).
for first time i'm trying out the debug capability.
the debug perspective (view?) is not able to see the main() source
file. (line unavailable and source not found) upon "stop in main"
setting.
The source path for the debug config used is "default" which as a top
level folder does have all the source in it all of which are under
"src".
It did not help to add a separate source path to src either and/or
have it search recursively down.
And note that the "add" is greyed out when i try to re-add my source
path under "default" which tells me it should be seeing my source.

Now note that i do have multiple objects/classes in my mains source
file. but i have no problem with run config working



UST.main(String[]) line: not available


and

Source not found.

I'm using uptodate jre6_30 on windows and first tried jre7 which fails
same way.

what should i be looking for.
any help appreciated,

bord

Mirco Dotta

unread,
Feb 3, 2012, 4:05:55 AM2/3/12
to scala-i...@googlegroups.com
Hi,

It's hard to say what is wrong, my only suggestion is to make sure that
the package declaration in your sources matches their physical location,
i.e., if a package's source is `foo.bar.buz`, then the source should be
located in the source folder, under `foo/bar/buz`.

Also, check that the level of generated debugging is set to `vars` (to do
so, go under Eclipse > Preferences > Scala > Compiler).

-- Mirco

Could you upload your project somewhere so that we can

iulian dragos

unread,
Nov 19, 2012, 6:53:52 AM11/19/12
to scala-i...@googlegroups.com


On Fri, Nov 16, 2012 at 8:53 PM, Kabob <kohl...@bdumail.com> wrote:
For the benefit of others who stumble on this months-old thread.   One cause of "source not found" is if a source file has nested packages.  Debugger will break in code of outermost package, but won't step into or break in nested ones (as of Scala compiler 2.9.3).

That's a very good point, thanks for following up. In general, don't expect anything to work very well when the directory structure does not follow your package declarations.

iulian
 



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais

Lorentz Green

unread,
Jan 13, 2016, 10:55:02 AM1/13/16
to Scala IDE User
Guys,

Any ideas if this is still "unsolvable" issue? I have a project where I follow a rule that package directories match declared packages inside files, but during debugging I see no source code.

I tried to "attach" source manually however source code appears for a split second in debug view and then disappears again... (why?!)

I tried one more thing - debugged one of my unit tests, the interesting thing is that initially source code and current debug line were showed correctly, however after logger call was hit source code lookup stopped working again. I use grizzled slf4j logger. After this code line debugger breaks: logger.debug(s"Comment: $comment")
I noticed that "debug" method in the Logger implementation has annotation @inline, maybe this one has any impact on debugger?

I do not know any other way to debug with current issues of Scala IDE source code lookup than put a log() call on every line in a source code - which is a debugging nightmare.

Basically Scala IDE debugger is half-useless to me... I wonder are there really not many people who use debugger and hit this issue?

Simon Schäfer

unread,
Jan 13, 2016, 11:20:22 AM1/13/16
to scala-i...@googlegroups.com


On 01/13/2016 04:30 PM, Lorentz Green wrote:
Guys,

Any ideas if this is still "unsolvable" issue? I have a project where I follow a rule that package directories match declared packages inside files, but during debugging I see no source code.

I tried to "attach" source manually however source code appears for a split second in debug view and then disappears again... (why?!)

I tried one more thing - debugged one of my unit tests, the interesting thing is that initially source code and current debug line were showed correctly, however after logger call was hit source code lookup stopped working again. I use grizzled slf4j logger. After this code line debugger breaks: logger.debug(s"Comment: $comment")
I noticed that "debug" method in the Logger implementation has annotation @inline, maybe this one has any impact on debugger?

I do not know any other way to debug with current issues of Scala IDE source code lookup than put a log() call on every line in a source code - which is a debugging nightmare.

Basically Scala IDE debugger is half-useless to me... I wonder are there really not many people who use debugger and hit this issue?
I don't know how many people hit that issue. I had this problem once and fixed it but can't really remember in which case I got it or how I fixed it. I think it was because an error occurred in the UI thread, which killed the editor in the end. Do you see any errors in the error log view? Also if you check the scala-ide log, is there anything suspicious logged?

On Monday, November 19, 2012 at 1:53:52 PM UTC+2, Iulian Dragos wrote:


On Fri, Nov 16, 2012 at 8:53 PM, Kabob <kohl...@bdumail.com> wrote:
For the benefit of others who stumble on this months-old thread.   One cause of "source not found" is if a source file has nested packages.  Debugger will break in code of outermost package, but won't step into or break in nested ones (as of Scala compiler 2.9.3).

That's a very good point, thanks for following up. In general, don't expect anything to work very well when the directory structure does not follow your package declarations.

iulian
 



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-user/50b25684-c211-4b8d-832a-1c8957433bc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

iulian dragos

unread,
Jan 13, 2016, 11:31:27 AM1/13/16
to scala-i...@googlegroups.com
On Wed, Jan 13, 2016 at 5:20 PM, Simon Schäfer <ma...@antoras.de> wrote:


On 01/13/2016 04:30 PM, Lorentz Green wrote:
Guys,

Any ideas if this is still "unsolvable" issue? I have a project where I follow a rule that package directories match declared packages inside files, but during debugging I see no source code.

I tried to "attach" source manually however source code appears for a split second in debug view and then disappears again... (why?!)

I tried one more thing - debugged one of my unit tests, the interesting thing is that initially source code and current debug line were showed correctly, however after logger call was hit source code lookup stopped working again. I use grizzled slf4j logger. After this code line debugger breaks: logger.debug(s"Comment: $comment")
I noticed that "debug" method in the Logger implementation has annotation @inline, maybe this one has any impact on debugger?
I think this might be due to call-by-name parameters. Normal "step" tries to be smart about closures, for instance stopping inside a closure if you're stepping over a "foreach" or "map" (normal step-over would run over the whole collection, which is particularly confusing in for-loops). I think it mis-fires in this case. What behavior exactly do you see?

 

I do not know any other way to debug with current issues of Scala IDE source code lookup than put a log() call on every line in a source code - which is a debugging nightmare.

Basically Scala IDE debugger is half-useless to me... I wonder are there really not many people who use debugger and hit this issue?
I don't know how many people hit that issue. I had this problem once and fixed it but can't really remember in which case I got it or how I fixed it. I think it was because an error occurred in the UI thread, which killed the editor in the end. Do you see any errors in the error log view? Also if you check the scala-ide log, is there anything suspicious logged?

On Monday, November 19, 2012 at 1:53:52 PM UTC+2, Iulian Dragos wrote:


On Fri, Nov 16, 2012 at 8:53 PM, Kabob <kohl...@bdumail.com> wrote:
For the benefit of others who stumble on this months-old thread.   One cause of "source not found" is if a source file has nested packages.  Debugger will break in code of outermost package, but won't step into or break in nested ones (as of Scala compiler 2.9.3).

That's a very good point, thanks for following up. In general, don't expect anything to work very well when the directory structure does not follow your package declarations.

iulian
 



--
« Je déteste la montagne, ça cache le paysage »
Alphonse Allais
--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-ide-user/50b25684-c211-4b8d-832a-1c8957433bc0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Scala IDE User" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-ide-use...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Lorentz Green

unread,
Jan 14, 2016, 3:15:48 AM1/14/16
to Scala IDE User
Hi,

I do see some errors in the logs, however they seem to be related to start/stop debugger, not sure if they impact debugger stepping... (attached - take a look).

I tried to extract specific code parts, that I suspected as culprits into separate project, but failed on all attemts... when put into single separate project - debugger finds all the source lines correctly and displays in the source code window - so now I suspect that the issue is related to the fact that I use scala maven integration and my app is split into multiple sub-projects.

One interesting observation, that debugger in the stracktrace view shows correct class and line of code, but fails to display it in code view - on maven multiproject env, however works fine if the same source code is debugged in "extracted" simple project example. Also I noticed that after some stepping source code is displayed again when debugger hits code in some other library that I use.

I will try to prepare "extracted" example, that would reproduce the issue... however no success yet.
scala-ide.log
eclipse.log

Simon Schäfer

unread,
Jan 14, 2016, 4:40:40 AM1/14/16
to scala-i...@googlegroups.com


On 01/14/2016 09:15 AM, Lorentz Green wrote:
Hi,

I do see some errors in the logs, however they seem to be related to start/stop debugger, not sure if they impact debugger stepping... (attached - take a look).
If they happen every time when the editor disappears, then they are related, otherwise not.

The stack traces are at least helpful, thanks. Are you on 4.3.0?

Lorentz Green

unread,
Jan 14, 2016, 4:41:12 AM1/14/16
to scala-i...@googlegroups.com
Yes 430

Reply all
Reply to author
Forward
0 new messages