Debugging my code but not CSLA

Debugging my code but not CSLA

Old forum URL: forums.lhotka.net/forums/t/2730.aspx


joel posted on Wednesday, April 18, 2007

Whenever we step though our code in the debugger, the debugger goes into the CSLA source code (and it takes a lot of stepping to get out).  I don't want to debug the csla code, just the code I am writing.  I don't know how the debugger even knows where the csla source code is, we just reference the dll in the bin\release folder.  How can I make the debugger step over the csla code but step into code in my dp_* methods?

Joel

Skafa replied on Wednesday, April 18, 2007

just set a breakpoint in you dp_ method, and run it to that point.

RockfordLhotka replied on Wednesday, April 18, 2007

I'm somewhat surprised as well. If you really are referencing the release build of an assembly, then you shouldn't have .pdb files for that assembly, and the debugger shouldn't be able to walk through the associated code - at least not reliably.

stefan replied on Thursday, April 19, 2007

Whenever I download and build a new version of the framework in VS2005,
the bin/Debug folder stays empty, while there is a csla.pdb file in the bin/Release folder.

Seems like a build-setting issue of VS2005.

Stefan

ajj3085 replied on Thursday, April 19, 2007

When you first attach to the process, try going to the Debug -> Windows -> Modules window.  Find Csla and right click; you may be able to make it forget about the pbd for Csla.

HTH
Andy

ksirmons replied on Thursday, April 19, 2007

We found csla.pdb and csla.xml being referenced in a text file called solution.project.vbproj.filelist.  I deleted those 2 lines from both the business project and the winforms project.

I also found the csla.pdb and csla.xml file in the bin\debug folders.  I deleted those files and now the project is many times easier to debug.

A nice side effect of stepping through your code was understanding how CSLA all ties together and how much work you actually did for us.

Thank you for the Framework,

Keith

RockfordLhotka replied on Thursday, April 19, 2007

It probably is a VS build config issue, especially if you are using VB.

I have found that the default VS config for VB doesn't give you access to the build manager screen, and defaults to building the debug build into the release folder. I think that's because I actually DO have VS configured to show the advanced build options, so I can switch between debug and release builds.

Just deleting the xml and pdb files isn't actually enough to have a release build. It may fix your debugging issues, but for release of your app you really do want to have a release build. The reason is that the compiler does extra optimization in release mode that will make your app run faster.

ksirmons replied on Thursday, April 19, 2007

Thank you,

We will keep that in mind when we get to release.

Keith

Copyright (c) Marimer LLC