How to disable VS's just-in-time debugging completely? - visual-studio-2010

Why I want to do this?
First, I never use it - spare me, this is going to sound ignorant, but I'm not interested. My debugging comes down to print and if statements. I've been doing it that way for a while, and have no interest in changing the way that works.
Second, a lot of programs which work until Visual Studio installation suddenly stop working upon it, just as Just-In-Time debugging starts to kick in.
Third, it's crashing some of my old programs (not my own, but programs I use) wherever a second screen is attached. Have no idea why this is happening.
Is there a way to turn it off completely?
I've disabled it in Visual Studio's options, but it still comes up with an error
An unhandled win32 exception ... Just-In-Time debugging this exception failed with the following error: No installed debugger has Just-In-Time debugging enabled. In Visual Studio, Just-In-Time can be enabled from ...
Check the documentation index for ...
(so in general, it's telling me that it isn't turned on)
How to disable it completely without uninstalling Visual Studio?

The way to do this is to select Debug > "Start without debugging (Ctrl+F5)" from the menu, instead of "Debug > Start (F5)".
You might also want to build your code in release mode when doing this - as the debug builds won't be of any benefit to you if you're not intending to debug them.

The issue of a windows program launching the debugger is not really one of changes in Visual Studio but is affected by changes in Windows which controls the JIT. You can build all code in release mode, but often want is just no debug pop ups. This is described in this article http://msdn.microsoft.com/en-us/library/k8kf6y2a(v=vs.80).aspx.
You need to issue the commands:
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting" /f /v "Disabled" /t REG_DWORD /d 00000001
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting" /f /v "DontShowUI" /t REG_DWORD /d 00000001
At that point you can run your programs without invoking the debugger. I do this in a batch file:
for /f "delims=" %%a in ('where reg 2^>nul') do #set theValue=%%a
if NOT "%theValue%."=="." GOTO :HaveReg
:: Might not have where - check again
for /f "delims=" %%a in ('reg /? 2^>nul') do #set theValue=%%a
if NOT "%theValue%."=="." GOTO :HaveReg
echo Unable to change registry keys to turn off program pop-ups
GOTO :DoneRegCheck
:HaveReg
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting" /f /v "Disabled" /t REG_DWORD /d 00000001
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Windows Error Reporting" /f /v "DontShowUI" /t REG_DWORD /d 00000001
:DoneRegCheck

Related

OutputDebugString() not showing message in DebugView, Windows 10 x64

I know there're guides on the Internet, and here is what I've done so far.
Run DebugView as Administrator. In DebugView, I have checked "Capture Win32"
I have set the following filter keys & restart the computer:
reg add "HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Debug Print Filter" /V DEFAULT /t REG_DWORD /d 0xf
reg add "HKLM\SYSTEM\ControlSet001\Control\Session Manager\Debug Print Filter" /v DEFAULT /t REG_DWORD /d 0xFFFFFFFF
I have debugged my app to make sure the OutputDebugString() is indeed executed.
But, the message from OutputDebugString() is still not showed in DebugView (if not debugged with Windbg) and Windbg (if debugged).

In Powershell, how can I prevent my insert key status from turning to "overwrite" every time I run a command?

First off, I know this is not default behavior. In fact, I've never seen anything like this happen and I'm a long time Powershell user.
I have no problems with the Insert key in any other application. However, in Powershell, its initial state is off, or "overwrite" - which is barely if every used anymore. When I press Insert to turn it on and run a command, it then turns back off.
This has become overwhelmingly frustrating as I frequently press Up Arrow to go to the previous command to edit it, and find that it's in overwrite mode and it really messes me up.
I googled and found nothing, so I decided screw it, I'm getting a new work PC soon anyhow, so I'll just get in the habit of hitting Insert every time I press Enter. Works fine - until I switch PCs and now at home I've been hitting Insert by habit and driving myself nuts.
This behavior happens in all Powershell windows - 64-bit, inside VSCode, etc.
On demand answer:
Check the InsertMode value in HKCU\Console registry key (and all subkeys). If present, then the value should be 1 for most console prompt-like programs, e.g. as follows (output truncated for brief: removed Ubuntu and multiple Command Prompt):
^^> reg query HKCU\Console /V InsertMode /S
HKEY_CURRENT_USER\Console
InsertMode REG_DWORD 0x1
HKEY_CURRENT_USER\Console\Command Prompt
InsertMode REG_DWORD 0x1
HKEY_CURRENT_USER\Console\powershell
InsertMode REG_DWORD 0x1
HKEY_CURRENT_USER\Console\Windows PowerShell
InsertMode REG_DWORD 0x1
HKEY_CURRENT_USER\Console\Windows PowerShell (x86)
InsertMode REG_DWORD 0x1
End of search: 9 match(es) found.
You'll probably want to go to the PowerShell properties to make sure that the Insert Mode is checked (set on) at the Options tab.
%APPDATA%\Microsoft\Windows\Start Menu\Programs\Windows PowerShell\ folder seems to be the right place where the Windows PowerShell.lnk shortcut is used to be saved. However, there could be more PowerShell shortcuts. Check
where.exe /R "%USERPROFILE%" *Powershell*.lnk|findstr /V /C:"Shell ISE"
or even (run from an elevated command prompt)
2>NUL where.exe /R C:\ *Powershell*.lnk|findstr /V /C:"Shell ISE"

Remotely adding printer with batch file ; 0x32 This operation is not supported

I am trying to add a network printer via batch file, provided I feed the data(Printer IP, Printer Name, Computer IP) into the entries.
rundll32 printui.dll,PrintUIEntry /if /b "KONICA MINOLTA C451 PS(P)" /c\\%computerNameIP% /h "x86" /f %windir%\inf\prnkm002.inf /r "IP_%computerNameIP%" /m "KONICA MINOLTA C451 PS(P)" /n\\%computerNameIP%\%printerName% /F %windir%\inf\prnkm002.inf
Now, once this command is completed, I receive the following error:
Operation could not be completed(error 0x00000032). This operation is not supported.
I ran a similar code with runs the GUI:
rundll32 printui.dll,PrintUIEntry /il /b "KONICA MINOLTA C451 PS(P)" /c\\%computerNameIP% /h "x86" /f %windir%\inf\prnkm002.inf /r "IP_%computerNameIP%" /m "KONICA MINOLTA C451 PS(P)" /n\\%computerNameIP% \%printerName% /F %windir%\inf\prnkm002.inf
and I have to choose a local local Printer: which I adjust to be TCP/IP and the drivers come default since I set it. After choosing my driver, I receive the error as well.
I just can't pinpoint what exactly isn't supported.
Windows 7 32-bit. I made adjustments to the registry, print management, group policy, but none of those seem concrete to what is preventing a remote add to a network printer.
I found another way to do it with the prncnfg.vbs files. First create the port, assign it, then manage it.
This is all located in the admin scripts in Windows folder

Enabling developer mode on Windows 10 Build build 10074

Windows 10 Insider Preview build 10074 has a known issue using the Settings application to enable developer mode. In this build, if you try Settings/Update & Security/For developers... the settings window suddenly closes.
Is there a workaround?
Yes, there's a work-around. In an administrator command prompt, type the following commands:
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowDevelopmentWithoutDevLicense" /d "1"
reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" /t REG_DWORD /f /v "AllowAllTrustedApps" /d "1"
Then reboot the machine to enable developer mode

VS2013RC requires IE10 but i need (not want) IE8

I've been evaluating the VS2013preview since its release and was keen to install the RC. The problem is we need ie8 for legacy testing as many customers out in the field still use it.
As a possible workaround would it be possible to either, skip or fool the install package into thinking its installed? or install ie10 and then drop back to ie8 after installation?
I appreciate there may be some areas of things like browserlink to ie that I cannot use but this is OK as I mostly use chrome for initial dev work prior to testing in the various browsers.
Credit goes to Jimmy here, but here's a hack to make it work:
#ECHO OFF
:IE10HACK
REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "9.10.9200.16384" /f
REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v svcVersion /t REG_SZ /d "10.0.9200.16384" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "9.10.9200.16384" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v svcVersion /t REG_SZ /d "10.0.9200.16384" /f
GOTO EXIT
:REVERTIE
REG DELETE "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v svcVersion
REG DELETE "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v svcVersion
REG ADD "HKLM\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "8.0.7601.17514" /f
REG ADD "HKLM\SOFTWARE\Microsoft\Internet Explorer" /v Version /t REG_SZ /d "8.0.7601.17514" /f
GOTO EXIT
:EXIT
The problem is you're trying to use the same machine for developing and testing. Don't rely on the local copy of IE on your machine for testing a legacy browser, instead rely on virtual machine copies of Windows and run that specific browser.
If you want a quick & dirty way to test your stuff in specific versions of IE use the IETester as mentioned by others in the comments. http://my-debugbar.com/wiki/IETester/HomePage
You might want to consider simply using a virtual machine to run a copy of Windows with IE8 in it for your testing, since you don't really use it for day to day stuff anyways.
Microsoft announced yesterday that they are removing the requirement.
http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/4153040-remove-the-requirment-for-internet-explorer-10-to-

Resources