rbulph Posted December 14, 2005 Posted December 14, 2005 If I interrupt debugging by clicking the "Break All" (") toolbar button, I can't evaluate any expressions in the Immediate Window. I get the message "Unable to Evaluate the Expression" whenever I try. But if I call the Stop statement in code, then I can. So I end up putting code in my form like: Private Sub picCanvas_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles picCanvas.DoubleClick If System.Diagnostics.Debugger.IsAttached Then Stop End Sub so that I can access the Immediate Window and query values. Is this right that I have to do this? Quote
Administrators PlausiblyDamp Posted December 14, 2005 Administrators Posted December 14, 2005 Why don't you just put a break point on the line(s) you want to cause the app to break at? Doing a Break All will often result in the application being put into debug mode but outside of any actual runable .Net code - that is why you cannot evaluate any expressions etc. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
rbulph Posted December 15, 2005 Author Posted December 15, 2005 Why don't you just put a break point on the line(s) you want to cause the app to break at? Doing a Break All will often result in the application being put into debug mode but outside of any actual runable .Net code - that is why you cannot evaluate any expressions etc. Because sometimes I don't have a particular point at which I want execution to stop. I'm running it and I just want to go into it to query some value. I don't know about the application breaking outside any runnable code - it can't even evaluate "? 7 + 3" for me, which I wouldn't think requires any runnable code. But anyway I can live with my suggestion above. Quote
Administrators PlausiblyDamp Posted December 15, 2005 Administrators Posted December 15, 2005 ? 7 + 3 worked just fine for me when I hit CTRL + BREAK... Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
rbulph Posted December 15, 2005 Author Posted December 15, 2005 ? 7 + 3 worked just fine for me when I hit CTRL + BREAK... Yes, it seems that if you hit CTRL + BREAK when the current form in the application has focus it works OK, but if you break by pressing the button in the toolbar or by hitting CTRL + BREAK while looking at the code, it doesn't work. Quote
Leaders snarfblam Posted December 15, 2005 Leaders Posted December 15, 2005 I tried pausing from the IDE and it worked fine for me. Is the code editor highlighting a line of code when you break (a "call return", it will be a different color than active line and have an arrow in the breakpoint margin)? Quote [sIGPIC]e[/sIGPIC]
rbulph Posted December 15, 2005 Author Posted December 15, 2005 I tried pausing from the IDE and it worked fine for me. Is the code editor highlighting a line of code when you break (a "call return"' date=' it will be a different color than active line and have an arrow in the breakpoint margin)?[/quote'] No, the same thing happens even if run a newly created project to which I've added no code. It's probably a bug. I have 2005 Express Edition. Quote
Leaders snarfblam Posted December 16, 2005 Leaders Posted December 16, 2005 Here is a question: are you using VB with the application framework enabled (it is under Project/Properties in the menu)? For some reason, I think that this might have something to do with it. Quote [sIGPIC]e[/sIGPIC]
rbulph Posted December 16, 2005 Author Posted December 16, 2005 Here is a question: are you using VB with the application framework enabled (it is under Project/Properties in the menu)? For some reason' date=' I think that this might have something to do with it.[/quote'] Yes I am, and you're right, when I deselect that it works OK. So I suppose that's my choice - either I turn that off or I continue dealing with this as I have been doing before. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.