Wrong module selected by debugger when debugging .jsp files

I tried to load about 5 modules into one project, each configured and deployed into different location. All modules are completely independent, I have it in one project only because I need to see them all on 1 workspace. Problem is, there are some files that have same name in various modules, for example /web/index.jsp. I have file named like this in 3 modules and I run these modules without any problems.
However when I try to debug one of these modules and set breakpoint inside this index.jsp file, application is running ok, but debugger doesn't want to stop at breakpoint. I discovered later, that debugger thinks the right index.jsp is in different module I'm actualy trying to debug (I can see it in debugger stack, or when I try to get there from a servlet method - those are mapped correctly). Any help here? This issue is not causing problems, only debugging is impossible.

EDIT> I found temporary solution, or better say workaround. I simply don't deploy modules (web facets) I don't need, so namespace conflict doesn't show up and I can debug as crazy :) This however adds a little checkbox work in deployment settings everytime I need to go to different modules and debug them, but its better than nothing

6 comments
Comment actions Permalink

Are you using generic "JSR45 compatible server" configuration or server
specific run configuration?

I tried to load about 5 modules into one project, each configured and deployed into different location. All modules are completely independent, I have it in one project only because I need to see them all on 1 workspace. Problem is, there are some files that have same name in various modules, for example /web/index.jsp. I have file named like this in 3 modules and I run these modules without any problems.
However when I try to debug one of these modules and set breakpoint inside this index.jsp file, application is running ok, but debugger doesn't want to stop at breakpoint. I discovered later, that debugger thinks the right index.jsp is in different module I'm actualy trying to debug as it shows in debugger stack. Any help here? This issue is not causing problems, only debugging is impossible.



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

I assigned "Web Application 2.5" features to my modules and created tomcat 6 local app server, not JSR45.

0
Comment actions Permalink

Are you using single run configuration for all your modules?

I assigned "Web Application 2.5" features to my modules and created tomcat 6 local app server, not JSR45.


--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

Yes, I have all modules (1 module = 1 web facet) defined in single run configuration. As I said, problem only occurs when namespace-conflicting modules are deployed at same time. It's not big issue since I found this workaround and I'm not sure if it good practice to have independent modules organized in one project. I have it like that only for sake of make things easier for few little apps.

0
Comment actions Permalink

IDEA determines source jsp-file by examining name of java class
generated for jsp. But in your case it isn't sufficient because
generated classes for your jsp files have same names. Perhaps IDEA may
determine correct source jsp by using more detailed analysis but I'm
afraid it will slowdown debugging.

In order to workaround the problem you can create separate run
configurations for all your modules.

Yes, I have all modules (1 module = 1 web facet) defined in single run configuration. As I said, problem only occurs when namespace-conflicting modules are deployed at same time. It's not big issue since I found this workaround and I'm not sure if it good practice to have independent modules organized in one project. I have it like that only for sake of make things easier for few little apps.



--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Comment actions Permalink

I see, that seems reasonable. Will do that this way.
Thanks for help Nikolay

0

Please sign in to leave a comment.