views:

458

answers:

7

On one of my two computers I see following behaviour:

Each time I press F10 (Step over) or F11 (Step Into) in the disassembler window, the focus is switched to the source view, resulting in next F10 / F11 done on the source level unless I switch focus back.

Can anyone recommend me what settings to inspect, or what to try to stay in the disassembler view?

+1  A: 

Look in the Tools > Options > Environment > Keyboard section, and check what F10/F11 are currently assigned to (although I can't believe it's something that simple)

Copying the settings from the working computer might solve it. You don't mention what version you're running, but I think they're in the same location in 2005 onwards : My Documents\Visual Studio 2005\Settings\CurrentSettings.vssettings. There's always the Import and Export Settings Wizard too.

CodeByMoonlight
The keys work, the problem is after they perform their action, the focus changes to source window.
Suma
Have you tried resetting the bindings? If it works on one computer and not the other, I'd try copying across the settings files.
CodeByMoonlight
Copying setting files sound like a nice idea. Perhaps you can create a separate answer for that, or edit this answer, so that if it works I can accept it? Once I will be trying it, I will also compare the settings file, perhaps I will find the difference this way.
Suma
Have you had any luck analyzing the file? Key bindings are near the bottom, assuming that's the problem.
CodeByMoonlight
A: 

Could it perhaps be: Tools->Options->Debugging->Enable address-level debugging?

I just tried in VS05, and when I have that unchecked, I can't even bring up the disassembly view, but I would guess that if you somehow got into disassembly view, having that option off would kick you out of disassembly view when you did a step over/into.

Michael Dunn
I have this option turned on. Thanks for trying, though.
Suma
+3  A: 

Did you try to reset settings on your VS?

from the Visual Studio command prompt window type devenv /ResetSettings

mfeingold
For the record: the answer was auto-accepted by the bounty system, it does not work.
Suma
This is sad. I did not know this detail - that it only happens on x86 native. Did you try it on a fresh install of VS? does it happen on VS2008? I do not do unmanaged - lucky me.
mfeingold
A: 

Close the source file window ? I had the inverse problem that cause F11 to always debug in assembly, it was fixed by closing the assembly window. May be it works in reverse too ?

Emmanuel Caradec
Nice idea, however does not work. Even when I close the source window, it is open again once I press F10/F11.
Suma
A: 

Not sure, if this would work but... try if you can?

  1. Open RegEdit
  2. Browse to HKEY_LOCALMACHINE -> SOFTWARE -> Microsoft -> Internet Explorer -> Main
  3. Add a DWORD under this key called TabProcGrowth
  4. Set TabProcGrowth to 0 (zero)

This is what I used when VS2005 debug mode stopped working (0:

KMan
Did not work (I saw no idea why it should, but being desperate, I have tried it anyway)
Suma
A: 

Try setting a breakpoint in the assembly view. I'm assuming the existing breakpoints are in the source view.

Kelly French
A: 

Try removing any .pdb files from the directory you are executing from. Also make sure your Options->Debugging->Symbols settings aren't pointing to any pdbs for the files in question.

Of course I'm assuming you've been through all the other Options->Debugging options, including the native section.

Jim Leonardo
Why? This does not make any sense to me. While debugging in disassembly, it is normal to have source and symbol information displayed together with the disassembly. This is not a problem (actually this is important for efficient debugging). The problem is switching to source window from unknown reason. While it is possible removing pdbs would really prevent any source being used, this is not what I am for.
Suma