A janela do depurador just-in-time do Visual Studio aparece na sessão RDP escolhida aleatoriamente

2

Em um servidor Windows Server 2008 R2 com Serviços de Área de Trabalho Remota instalado e com vários usuários conectados, a janela Depurador Just-In-Time do Visual Studio pode aparecer em qualquer sessão RDP, não necessariamente na sessão cujas ações causaram o erro.

Os erros estão ocorrendo em um aplicativo ASP clássico que usa um objeto COM VB6 herdado e um banco de dados do SQL Server. Parece que um erro no processo w3wp.exe não sabe qual sessão do navegador do usuário do RDP iniciou as ações que levaram ao erro, portanto, ele seleciona uma sessão RDP aleatoriamente para gerar a janela do Depurador JIT. Enquanto a caixa de diálogo é exibida, o aplicativo ASP Classic congela para todos, independentemente de qual sessão RDP eles estão ou se estão acessando o aplicativo remotamente. Para piorar, a janela tende a aparecer sob as janelas ativas do usuário. Para sair da situação, deve-se pedir a cada pessoa com uma sessão RDP na máquina para procurar a janela do Depurador JIT e cancelá-la.

Existe alguma maneira de forçar a janela do Depurador JIT a aparecer na sessão RDP de um usuário em particular - preferencialmente a sessão de um usuário que deseja depurar o processo?

    
por Zarepheth 05.01.2016 / 19:05

1 resposta

1

Como está em um servidor de terminal e em um servidor em produção, desinstale o Visual Studio.

O JIT Debugger se instala quando você instala o Visual Studio.

Eu recomendo strongmente usar um computador local para a necessidade do seu código, já que o JIT precisa de janelas do console .

Enabling or disabling Just-In-Time debugging

You can enable or disable Just-In-Time debugging from the Options dialog box. To enable or disable Just-In-Time debugging

On the Tools menu, click Options.

In the Options dialog box, select the Debugging folder.

In the Debugging folder, select the Just-In-Time page.

In the Enable Just-In-Time debugging of these types of code box, select or clear the relevant program types: Managed, Native, or

Script.

To disable Just-In-Time debugging, once it has been enabled, you must be running with Administrator privileges. Enabling Just-In-Time

debugging sets a registry key, and Administrator privileges are required to change that key.

Click OK.

By default, Windows Forms applications have a top-level exception handler that allows the program to continue to run if it can recover. As a result, you must perform the following additional steps to enable Just-In-Time debugging of a Windows Forms application. To enable Just-In-Time debugging of a Windows Form

Set the jitDebugging value to true in the in the system.windows.form section of the machine.config or

application.exe.config file:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

In a C++ Windows Form application, you must also set DebuggableAttribute in a .config file or in your code. If you compile

with /Zi and without /Og, the compiler sets this attribute for you. If you want to debug a non-optimized release build, however, you must set this yourself. You can do this by adding the following line to your the AssemblyInfo.cpp file of your application:

[assembly:System::Diagnostics::DebuggableAttribute(true, true)]; 

For more information, see DebuggableAttribute.

Just-In-Time debugging may still be enabled even if Visual Studio is no longer installed on your computer. When Visual Studio is not installed, you cannot disable Just-In-Time debugging from the Visual Studio Options dialog box. In that case, you can disable Just-In-Time debugging by editing the Windows registry. To disable Just-In-Time debugging by editing the registry

In the Start menu, click Run.

In the Run dialog box, type regedit, then click OK.

In the Registry Editor window, locate and delete the follow registry keys:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\DbgManagedDebugger

If your computer is running a 64-bit operating system, delete the following registry keys also:

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows NT\CurrentVersion\AeDebug\Debugger

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\.NETFramework\DbgManagedDebugger

Take care not to accidentally delete or change any other registry keys.

Close the Registy Editor window.

Just-In-Time debugging errors

You might see the following error messages that are associated with Just-In-Time debugging.

An unhandled win32 exception occurred in <program>. Just-In-Time debugging this exception failed with the following error: The logged

in user did not have access to debug the crashing application.

This message indicates that Just-In-Time debugging failed because you do not have proper access permissions. For information on the

required permissions, see [Obsolete] Remote Debugging Permissions.

Unable to attach to the crashing process. The specified program is not a Windows or MS-DOS program.

This error occurs when you try to attach to a process running as another user under Windows 2000.

To work around this problem, start Visual Studio, open the Attach to Process dialog box from the Debug menu, and find the process you

want to debug in the Available Processes list. If you do not know the name of the process, look at the Visual Studio Just-In-Time Debugger dialog and note the process ID. Select the process in the Available Processes list and click Attach. In the Visual Studio Just-In-Time Debugger dialog, click No to dismiss the dialog box.

Debugger could not be started because no user is logged on.

This error occurs when Just-In-Time debugging tries to start Visual Studio on a machine where there is no user logged onto the

console. Because no user is logged on, there is no user session to display the Just-In-Time debugging dialog box.

To fix this problem, log onto the machine.

Class not registered.

This error indicates that the debugger tried to create a COM class that is not registered, probably due to an installation problem.

To fix this problem, use the setup disk to reinstall or repair your Visual Studio installation.

De: link

    
por 05.01.2016 / 20:02