简体   繁体   中英

Intellij IDEA Alternate source while debugging

Env:

Mac OS
IDEA Community Edition 15

Hi,

I am currently facing two issues while remote debugging. Googled around but haven't been able to fix'em.

  1. Despite the source code being available within the project, the debugger always stops in the maven sources. Question : Is there a setting/workaround that boils down to "Prefer project modules over maven sources while debugging" ?
  2. Idea showed a popup showing the alternate sources initially. After selecting local module i disabled it. Now i can not re-enable it (for other local modules). The intended behaviour was that it automatically goes to local module source but that not working. Not irritating enough, Preferences -> Build -> Debugger -> "Show alternate source switcher" is not working. It always keeps disabled no matter what i do.

Any inputs are much appreciated.

Rakesh

Update

Solution for #2 is to do it the hard way. Open up

/Users/user-name-here/Library/Preferences/IdeaIC15/options/other.xml

and set 'SHOW_ALTERNATIVE_SOURCE' to true ie

<option name="SHOW_ALTERNATIVE_SOURCE" value="true" />

and restart IDEA

Even I had the same problem. I had external jars files attached in the Project_Structure -> Modules -> Dependencies. I did the following trick, it worked for me and it is not the remote debugging. I attached the source code of those jar files in Project_Structure -> Libraries and click the + in the second window pane (I am using Intellij Idea Ultimate 2018.2) then java option in the drop-down list. After selecting java option, a file browser window will open up, choose the source code directory you want to attach during the debugging.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM