Book a Demo

Author Topic: Debug By Attaching to a process  (Read 5551 times)

gr8Moses

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Debug By Attaching to a process
« on: April 09, 2008, 08:10:07 pm »
Hi,
   I am attaching EA7.1.828 to a windows process.
   I have the PDB file in the same directory as the executable.
   Now, i opened the source code and applied break points.

   But these are not being hit. I perform a GUI operation, which should cause my EXE to do something .... but instead, it just hangs ... does nothing. When i detach EA from the executable (stop Debug). the exe continues working & i can see the results on the GUI.

   My executable is heavily multithreaded. Does it matter ? am i missing something ? Should i explicitly specify the PDB file somewhere ? I did provide "Mocrosoft NAtive" in my Debug Screen. Pls Help ...........

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Debug By Attaching to a process
« Reply #1 on: April 09, 2008, 08:37:12 pm »
Search the forum for this. I think I saw someplace that EA will only debug on one thread, but I could be (very) wrong on this.
No, you can't have it!

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Debug By Attaching to a process
« Reply #2 on: April 11, 2008, 03:01:15 pm »
My very learned friend and colleague Steve has had a look at this. His suggestions are as follows:

Note:
 
A) EA supports debugging/recording Multi-threaded applications.
B) The PDB should exist in the path stamped in the exe at the time of the build.
 
This looks like a potential bug in the EA debugger.
 
1. Ensure that the breakpoints remained RED during the attach, ie that the breakpoints were BOUND. [no ? or ! in breakpoint icon]
 
2. If the breakpoints are bound, check that the GUI is not in the middle of doing a Modal Dialog and that the application hanging is not due to the dialog window being hidden from view. [This happens quite often, dialogs not getting brought to top]
 
3. If not that case, try following these steps exactly:
 
a. create new model view
b. Import source code for GUI application
c. Build GUI application, ensuring debug information and PDB created
d. Set 1 breakpoint in source code.
e. Configure script to run application, NOT attach
f. Confirm that the application encounters breakpoint
 
4. If (3) succeeds:
 
    Change above script to attach.
    Run application outside of EA.
    Attach to application from EA
 
 
If unable to debug then send the zipped project to Sparx Support attn Steve Meagher to investigate here. Include a screenshot of the Debug Toobar Output Window.

See how you go.

Best Regards, Roy

gr8Moses

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Debug By Attaching to a process
« Reply #3 on: April 16, 2008, 03:56:51 pm »
Hi RoyC,
     1. The Breakpoints were Red, without a ? or !
     2. My Source code is not the GUI code, but the backend code.So, no modal Dialog Boxes in the picture.
     3. I opened the exe in Textpad and found that the path of PDB is correct.

I cannot build the executable from EA .. it is a huge application that takes ~12 hours to build. So, i prefer to attach.
      I launched the application from EA and no issues observed. When i tried to Attach it to the process and execute a use case, my process hangs! ... I have written this post, but the application aint progressing.

 So ... i stopped debug ........ and my use case completed!!
:(

RoyC

  • EA Administrator
  • EA Practitioner
  • *****
  • Posts: 1297
  • Karma: +21/-4
  • Read The Help!
    • View Profile
Re: Debug By Attaching to a process
« Reply #4 on: April 16, 2008, 04:57:52 pm »
Well, things do not appear  to be going very smoothly.

Please send in a bug report to Sparx Support using the 'Report a bug' link at the foot of this Forum screen. Put a link in the report to this forum posting so that they can see what Steve suggested and what happened next.

When Support reply to you, copy the response to a message here so that the other Forum users can see what happened.

Thanks very much.
Best Regards, Roy