Using GlobalFlags to call vsjitdebugger with VS2010 - visual-studio-2010

I've upgraded to Win7 and VS2010. Previously on Win2K and VS2008, I used GlobalFlags to debug an application on startup, simply by setting it's debugger to vsjitdebugger - see the screenshot below. Unfortunately, this doesn't work on my current setup - a google and search of SO haven't turned up any answers.
Thanks in advance.
UPDATE: Forgot to mention that my global flags settings do seem to have some effect - running my command on the command line causes Windows to say the program has crashed - it works just fine without the global flags. This is leading me to think my command line for the debugger is incorrect - but that's just a guess. I'd be interested in hearing from anyone who's got this to work.
alt text http://img825.imageshack.us/img825/3538/55489547.png

Running the 64-bit version of Windows 7? Using the 32-bit version of gflags.exe?
You can also edit the registry directly. An example .reg file for notepad.exe:
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe]
"Debugger"="vsjitdebugger.exe"

Run the VS2010 on Win7 with administrator privilege, "vsjitdebugger.exe" works fine.

It looks like there's an extra step in Win7 which I wasn't expecting - it throws up a "MyProgram has stopped working" screen first. If you look at the details, it says it's an application crash.
You get the options:
"Check online for a solution and close the program"
"Close the program"
"Debug the program"
Clicking debug then pops up the vsjitdebugger dialog and all is well.

Related

JetBrains IDE Error on start : The application was unable to start correctly (0xc000007b)

I have got this error, but hardly could find the solution after 2 times reinstalling my IDE and even I installed 'All in One runtimes' but it couldn't help since I think the problem originally started after I changed few settings in windows defender setting and then tried to reset them.
But sure others have reported this problem and had no idea of what had happend all of a sudden to get following error when trying to run the application:
JetBrains IDE Error on start : The application was unable to start correctly (0xc000007b)
The application was unable to start correctly (0xc000007b)
*1 - which in my case was Phpstorm64.exe running on windows 10
I just felt there is no 'easy to find' solution for this occurring problem, so I decided to post it on Stackoverflow
In my case this was helpful and worked for me:
just disable ASLR (Address space layout randomization) from windows defender
in Windows 10 you should follow these steps:
open Settings (just right-click on windows start and choose
settings)
search for 'Windows Defender Settings' or just go to 'Update & Security' > 'Windows Security'
then open 'App & browser control', in the new opened window scroll down to the end to find 'Exploit protection settings', click
that
sort of settings will be shown and you can change the default settings. to create an exception you should click "Program settings"
(which doesn't seem to be a button,but it is!)
click 'add program to customize', in the dialog enter your ide name.exe (you can easily find it by clicking 'open file location' on
shortcut of the application)
in my case the application name was 'phpstorm64.exe'
next you have to look for 'force randomization for images (Mandatory ASLR)' check the 'override system settings' and switch it off and apply settings.
I'm not sure if it's needed,but turning off 'Randomize memory allocations (Bottom-up ASLR)' stated to work for others
I would appreciate if you help to get a complete solution for this problem , thanks
The crash is probably caused by ASLR Windows feature, the relevant ticket in the JetBrains issue tracker: IDEA-184029
Please check if the following workaround:
Turn the feature off globally or for a specific executable path https://learn.microsoft.com/en-us/microsoft-365/security/defender-endpoint/customize-exploit-protection
helps

visual studio code "launch json" on run, how to set debug console as default

I went to user settings to set the debug console to default (when I try to debug now the default console is terminal. I lose the small debug icons to skip, stop etc even when I manually select debug console). I am watching Python tutorials using Vs Code and his default is debug. How can I do this?
Secondly, when I try to run or debug, I am prompted to open LaunchJS, even if it is already open. I attempted to run it using the debug selection "current file, integrated terminal" and also "Python: Attach". Neither will work although the JSON file has these options. I looked at some MS videos but I am not understanding the problem.
Any help is appreciated. Thanks.
I found the answer at this link: https://code.visualstudio.com/docs/python/python-tutorial
I had not selectd a Python interpreter which establishes a python workspace. Was just trying to run with debugger. A simple program now runs. My guess is that the Python tutorial I selected is too old to follow with this version of VS Code, since I am unfamiliar with any version of VS Code.
Thanks.

Windows 7: Property Handler works in Explorer but Not FileOpenDialog?

Working on writing a custom property Handler for our custom file type in windows 7. I have installed the Windows 7 SDK and built the sample Property Handler. After registering the handler, it works great in Windows Explorer, but in the common file open dialog the custom values do not appear. Does anyone know if there is something special I need to do to get the properties to appear in common dialogs?
Explorer:
File Open Dialog:
OK, figured it out. Here is the deal. My app is 32 bit and I am on a x64 system. Because the PropertyHandler is written in x64 to support the shell out of process. But for the file open dialog it needs to run inprocess, so the x64 dll can not run. I confirmed this by creating a quick x64 app and the fileopen dialog works the same as the OS. Hope this helps someone else in my shoes later on, hate answering my own question, but don't want people wasting NRG on this one as I found the solution.

Using "run as" with Visual Studio debugger

Is there any way to use the "Run As" option in Windows XP in conjunction with Visual Studio's debugger, to debug an issue that occurs in my application only when certain users are logged in?
I have ran the application from my machine using "run as" to pretend to be the user in question, and I got the same error as they did. I would like to debug this error and see where and what exactly is causing it. The error occurs specifically when a certain domain user is logged in, and never otherwise.
Is there any script or approach I can take to debug this error; that is too launch the application, as the problem user, and then use the debugger?
Trying to attach to the process didn't work since it was a C# managed process and VS didn't let me attach.
The first two options that come to mind are...
Log onto the machine as the user (simplest approach)
Right-click on the Visual Studio executable and run as that user.
I think that you could edit the .config file to use impoersonation, but I'm not sure if that will result in the app running truly the way it would for the user.
Although with good error handling, the error message itself should be enough to tell you where in the code the problem is... At the very worst, you could compile it in debug mode (so you have all the symbols) and add some global error hanlding and get the exact stack trace...
I use David Strattons second solution (run as Administrator) because my application requires administrator privileges (-> elevated).
Another solution could be to start the application as the user and use "Debug | Attach to process..."

webbrowser disable script debugging in Visual Basic 6

I want to disable script errors from popping up in a VB6 application. (I have VB6 installed on this machine).
Currently, if I navigate to a particular page, it pops up saying "INternet Explorer Script Error: An error has ocurred in the script on this page" ... "Do you want to continue running scripts on this page?"
Setting the webbrowser1.silent to 'true' does not work. Instead all that happens, is instead of displaying an error message, it starts up the actual 'script' debugger, and then exits the program. On a machine without the (visual studio) debugger, it still pops up a message asking to use the debugger, i.e., on Vista, (when silent is set to true).
Manually changing the 'disable script debugging (other)' (and regular one), doesn't seem to working in MSIE (also testing version 6.0 for xp users).
How do I disable script errors?
Thanks in advance!
WebBrowser.ScriptErrorsSuppressed = True
(The above code will Not work in VB6)
(Try this instead)
WebBrowser1.Silent = True
The webbrowser.silent can be reset to true when the application is run if you've set it in the design window. You may have to reset it to true when starting the application (ie: at runtime) and see if that works.
I Think It's That You Need
Write This Code In Your Form_Load Or Everywhere You Want
WebBrowser.ScriptErrorsSuppressed = True

Resources