visual-studio-debugging

How do I make Visual Studio 2015 ignore handled exceptions?

僤鯓⒐⒋嵵緔 提交于 2021-02-17 07:05:28
问题 So I have this chunk of code, and when debugging in Visual Studio, it's breaking even though the exception is handled in my code. I only want it to break when this exception is unhandled by my code. The Exceptions Settings box only has an option to continue on unhandled exceptions in user code, but that's not acceptable because I still need it to break if it's unhandled. I've seen screenshots of previous versions of VS that had an option for this. Is this a VS 2015 bug or did microsoft remove

Executing method on stop debugging

自作多情 提交于 2021-02-16 19:46:37
问题 I'm looking for a way to execute a method on stop debugging in an ASP.NET web application. I have several resource releases methods that I have to execute in any way the application shuts down. (Including stop debugging (kill)) I've tried Application_End and overriding Dispose() in global.asax but they are not executing on stop debugging. Either AppDomain.CurrentDomain.ProcessExit event. Actually it makes sense any method can not be executed while we kill the process but it might be a

Executing method on stop debugging

℡╲_俬逩灬. 提交于 2021-02-16 19:45:17
问题 I'm looking for a way to execute a method on stop debugging in an ASP.NET web application. I have several resource releases methods that I have to execute in any way the application shuts down. (Including stop debugging (kill)) I've tried Application_End and overriding Dispose() in global.asax but they are not executing on stop debugging. Either AppDomain.CurrentDomain.ProcessExit event. Actually it makes sense any method can not be executed while we kill the process but it might be a

Compilation errors when stepping over breakpoints

风格不统一 提交于 2021-02-07 18:39:51
问题 I've started getting weird errors whenever I hit a breakpoint and either try to step over it or into it. I get the message: Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed. The projects are compiling just fine and this does not happen when I don't hit any breakpoints. I'm using Visual Studio 2019, 16.3.1 and this happens in all of my solutions, not just one. I've tried the following but nothing has worked: Clearing my .vs-folder

Compilation errors when stepping over breakpoints

浪子不回头ぞ 提交于 2021-02-07 18:38:40
问题 I've started getting weird errors whenever I hit a breakpoint and either try to step over it or into it. I get the message: Edits were made which cannot be compiled. Execution cannot continue until the compile errors are fixed. The projects are compiling just fine and this does not happen when I don't hit any breakpoints. I'm using Visual Studio 2019, 16.3.1 and this happens in all of my solutions, not just one. I've tried the following but nothing has worked: Clearing my .vs-folder

Is there a better way to pass formatted output to OutputDebugString?

醉酒当歌 提交于 2021-02-05 04:44:49
问题 Typically, when I need to do debug output in Windows, I use the following C code segment: #ifdef _DEBUG #define DBGPRINT( kwszDebugFormatString, ... ) \ { \ wprintf_s( L"[%s:%d] ", __FUNCTIONW__, __LINE__ ); \ wprintf_s( kwszDebugFormatString, __VA_ARGS__ ); \ } #else #define DBGPRINT( kwszDebugFormatString, ...) ;; #endif I'd like to recode this to use OutputDebugString which doesn't accept a format string. I consider statically allocating a small array on the stack (e.g., WCHAR wszBuf[100]

Can I stop Visual Studio URL decoding Command Arguments in Debug mode?

和自甴很熟 提交于 2021-01-29 05:32:59
问题 If I set my program to echo command arguments and run in Visual Studio debugger with Command Arguments "https%3a%2f%2fas" it will echo 'https://as' However, if I run from the command line 'myprog.exe https%3a%2f%2fas' then it will echo 'https%3a%2f%2fas' Why is it handling this differently, and how can I stop it? I have to pass in an argument that is URL encoded and it needs to not be interpreted by Visual Studio first. Program is C++ and it's Visual Studio 2017 if that is any help. 回答1: Can

Cannot watch contents of variables when debuggin ASP.NET 5 IIS Express

断了今生、忘了曾经 提交于 2021-01-28 05:05:48
问题 When I debug an ASP.NET 5 web application it hits my breakpoints, but I cannot watch the contents of variables created locally. Example code from startup.cs using empty project as template: public void Configure(IApplicationBuilder app) { app.UseIISPlatformHandler(); var dummy = DateTime.Now; app.Run(async (context) => { await context.Response.WriteAsync("Hello World! " + dummy); }); } When I put a breakpoint on "app.Run(...." it hits the breakpoint but I cannot see the content of variable

Cannot watch contents of variables when debuggin ASP.NET 5 IIS Express

时光怂恿深爱的人放手 提交于 2021-01-28 05:04:40
问题 When I debug an ASP.NET 5 web application it hits my breakpoints, but I cannot watch the contents of variables created locally. Example code from startup.cs using empty project as template: public void Configure(IApplicationBuilder app) { app.UseIISPlatformHandler(); var dummy = DateTime.Now; app.Run(async (context) => { await context.Response.WriteAsync("Hello World! " + dummy); }); } When I put a breakpoint on "app.Run(...." it hits the breakpoint but I cannot see the content of variable

How to force ASP.NET Core 5 source code to not be optimized

大城市里の小女人 提交于 2021-01-02 18:10:51
问题 I'm trying to debug the Antiforgery code in the ASP.NET Core 5 framework. I have built the code successfully using the instructions in https://github.com/dotnet/aspnetcore/blob/master/docs/BuildFromSource.md using the Debug configuration. I have added the source code project to my test project and referenced it. I've checked that the Configuration is set to Debug. I've made sure that "Suppress JIT Optimizations" has been checked. "Optimize Code" in Project Properties -> Build, is unchecked