.NET

Reply
Distinguished Contributor
jmaeding
Posts: 1,045
Registered: ‎12-27-2006
Message 1 of 6 (208 Views)
Accepted Solution

Break points not stopping code on modeless forms

208 Views, 5 Replies
03-08-2012 04:20 PM

I am using acad 2012, and VS 2010 (C#) on win 7 64 bit.

I made a form, and showing it as modeless via Application.ShowModelessDialog... as recommended by everyone and that works fine.

I have a button that does something, and I set a break point right on the first line of code for its callback.

The button runs fine, but VS is not stopping at the break point.

 

Is there a different technique required when debugging modeless forms?

thx

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

Hi,

 

have you set Framework4 as the current Framework for your project?

If you don't want FW4 then a good point to look at: >>>here<<<

And NEXTFIBERWORLD could be a point-of-interest, look to >>>this issue<<<

 

- alfred -

*Expert Elite*
Alfred.NESWADBA
Posts: 9,403
Registered: ‎06-29-2007
Message 2 of 6 (196 Views)

Re: Break points not stopping code on modeless forms

03-09-2012 12:01 AM in reply to: jmaeding

Hi,

 

have you set Framework4 as the current Framework for your project?

If you don't want FW4 then a good point to look at: >>>here<<<

And NEXTFIBERWORLD could be a point-of-interest, look to >>>this issue<<<

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
jmaeding
Posts: 1,045
Registered: ‎12-27-2006
Message 3 of 6 (181 Views)

Re: Break points not stopping code on modeless forms

03-09-2012 08:34 AM in reply to: Alfred.NESWADBA

yah, setting framework to 4 did the trick.

The other options Kean mentioned are less desirable.

Wish I could stick with 3.5, as 4 is not always on a given machine.

Guess I can switch back before deploying.

 

Thanks a bunch for your reply, i was worried about this last night.

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

*Expert Elite*
Alfred.NESWADBA
Posts: 9,403
Registered: ‎06-29-2007
Message 4 of 6 (169 Views)

Re: Break points not stopping code on modeless forms

03-09-2012 12:53 PM in reply to: jmaeding

Hi,

 

>> Wish I could stick with 3.5, as 4 is not always on a given machine.

If AutoCAD 2012 is installed, then Framework 4 is installed, it does not run without! :smileywink:

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Distinguished Contributor
jmaeding
Posts: 1,045
Registered: ‎12-27-2006
Message 5 of 6 (167 Views)

Re: Break points not stopping code on modeless forms

03-09-2012 12:56 PM in reply to: Alfred.NESWADBA

I lose track of what needs what. I program for 2009 and 2012 so I will just target each project for correct framework.

thx

internal protected virtual unsafe Human()
http://onesmallstepforcad.com/

*Expert Elite*
Alfred.NESWADBA
Posts: 9,403
Registered: ‎06-29-2007
Message 6 of 6 (165 Views)

Re: Break points not stopping code on modeless forms

03-09-2012 01:08 PM in reply to: jmaeding

Hi,

 

>> I lose track of what needs what

check the bottom of >>>this link<<<

...and for 2012 you need 4.0

 

- alfred -

-------------------------------------------------------------------------
Alfred NESWADBA
Ingenieur Studio HOLLAUS ... www.hollaus.at
-------------------------------------------------------------------------
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!