When I'm debugging in Visual Studio I like to see an object and all its nested properties open in a watch window. How can I persist that watch window so I can view it as a tab after I've ended the debugging session?
You can not see the value of watching of your object if you close debug. What you can do how ever is to use the functions that System.Diagnostics library offer to monitor some of your variables.
and by using this code
Debug.Write("value of :" + YourVariable);
you can then use the DebugView from Sysinternals to monitor that debug output.
Related
I have a C# WPF project that uses System.Console.WriteLine for debugging and in Visual Studio we can see the output in Output window.
I would like to move to JetBrain's Rider, but the Console output is not shown in the Debug Output window, unlike the output from System.Diagnostics.Debug.
I understand that I should've used System.Diagnostics to begin with and would be willing to brute force replace all calls in my code, but I'm wondering, if there is a setting in Rider that could spare me the hassle ...and discussions with colleagues ;o).
I am currently trying to debug an ascx.vb page and the breakpoint is not hitting the page.
I am getting this error "The breakpoint will not currently be hit. No symbols have been loaded for this document".
I have been using this project for 2 months and never encountered this error before. I just did a small change on add button save it on chrome could see the change however, when i am debugging getting this issue for the first time.
Steps done:
Attach the breakpoint to the ascx.vb page
click on debug then attach to process as below (highlighted in yellow) :
checks already done:
Project is being run on debug mode
when debugging the symbols are not loaded.. have check Debug windows modules and is as below:
I have tried loading some symbols which created a folder symbolscache but still the debug point did not hit the page.
Is there something wrong in browser/iis or VS.
I was using VS 2017 but the same issue is occurring on VS 2019 professional.
Any help will be highly appreciated.
Thanks.
You can try to disable the "Just My Code" option in the Debug/General settings.
or
Right click the Solution in solution explorer, click "clean solution", this deletes all the compiled and temporary files associated with a solution. do a rebuild of the solution and try to debug again.
I added an XPC Service to my project and I would like to set breakpoints and inspect variable contents in the debug area in XCode. Breakpoints that I set in the service's code are not recognized (obviously, the debugger is attached to the main apps process. How and I attach the debugger (manually or automatically) to the XPC Service process after my main app launches it? Is there some way to run the service alone and send it messages without it being launched from the main app?
Debug -> Attach To Process -> By Process Identifier (PID) or Name...
Type in your XPC service process name. The next time launchd starts up your XPC service, Xcode will attach.
I am actually not sure how to attach the debugger. But you can still use "NSLog" for debug output on the console. Then start the "Console.app" in "/Applications/Utilities/Concole.app". Depending on your system language this app may have a different name (it's localized). It shows ALL NSLog outputs from all Applications which are running including your xpc-services.
It's not the debugger, but you will get informations out of your service.
There's a lot of examples for ActionScript over the web using trace() to print results.
I'd tryied it using Flash Builder 4, but it don't print to the console. Where can I see the output?
Are you in debug mode ?
Put a breakpoint on the line where the trace() is wrote (ctrl+shift+b), debug and see if the trace is reached.
Are you printing the right string? try to use also a static text in front when doing trace like trace("Loading file: ", _myFile.url);
If you do not want to use Flash Player debugger, but you want to log messages without annoying Alert popups, you can easily
log to the Firebug console.
Are you sure that you are running the debug build and not the release build?
I had the same problem even with the debug player. I could step right past a trace call in the debugger with no console output. I was pulling my hair out checking mm.cfg, flex-config.xml, .actionScriptProperties and all the options I could find in FlexBuilder. Nothing worked...
..until I rebooted my machine (Windows XP 64-bit). No other changes necessary!
I've written a c# windows app, that performs some DB intensive operations. (MySQL connector v6).
When running the project in Debug mode, everything works fine. However, when I run the prject in release mode, it sometimes quits operation midway - with no error message, nothing in the event logs etc.
What would be the best way to debug release mode - when everything works in debug mode?
Thanks for any help,
Bob
You can create a log file and have the application write lines to it with information of your choice, similarly to how the console may be used for debug purposes in a windows form application. You can write values of certain variables to this file, or even just write distinct phrases in select places of the code that will help you detect where the program is in execution when it fails.
Bobby is correct in asking about Application Event Log. If it is bombing on a .NET error, it will likely be logged.
If that doesn't give you anything, wrap the entire app in a try/catch block. On your exception handling, log the error (application log, file, etc...). Make sure when you log it to capture the call stack.
I've got exactly the same problem - application running in debug mode and fail in release. Try the following:
Wrap everything in Program.cs in try{}..catch{} block and it will show a reason
I don't know why but my application failed on Program.SetCompatibleTextRenderingDefault() function with message that it should be called before any instances on IWin32Window or something like that
It is very strange errors for me cuz i didn't have any code before this function. But you can try - maybe it will show something useful for you