Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Debugger doesn't support debugging x86 processes on x64 Windows #1716

Open
cwistedt opened this issue Aug 16, 2017 · 8 comments
Open

Debugger doesn't support debugging x86 processes on x64 Windows #1716

cwistedt opened this issue Aug 16, 2017 · 8 comments

Comments

@cwistedt
Copy link

Environment data

dotnet --info output:
.NET Command Line Tools (1.0.4)

Product Information:
Version: 1.0.4
Commit SHA-1 hash: af1e6684fd
Runtime Environment:
OS Name: Windows
OS Version: 6.1.7601
OS Platform: Windows
RID: win7-x64
Base Path: C:\Program Files\dotnet\sdk\1.0.4

VS Code version:
1.15.0

C# Extension version:
1.12.1

Steps to reproduce

  1. dotnet new mvc -o projname
  2. cd projname
  3. code . (start vscode)
  4. change netcoreapp1.1 to net452 in projname.csproj
  5. run: dotnet restore
  6. ctrl+shft+d (opens debug)
  7. Hit F5 (start debug) -> Choose .Net Core to create a launch.json
  8. In launch.json change to net452
    and .dll to projname.exe
  9. Hit F5 again -> Click open Configure Task Runner -> Choose .Net Core
  10. In tasks.json Change "command": "dotnet build", -> "command": ""dotnet build '${workspaceRoot}/projname.csproj'"",
  11. Set a Breakpoint and Hit F5 again
  12. Popup showing "Only 64-bit processes can be debugged."

Expected behavior

Should start debugging and hit breakpoints

Actual behavior

Only shows the error message and stops

If i change the to netcoreapp1.1 in projname.csproj
and in launch.json change to netcoreapp1.1
and .dll to projname.dll the debbuging works and the breakpoints are hit.
I checked the projname.dll that netcoreapp1.1 produced and the projname.exe that the net452 produced. And they are both in x86.

Am i doing something wrong, have something installed incorrectly or is this the expected behaviour?

@gregg-miskelly
Copy link
Contributor

You aren't doing anything wrong. x86 debugging is not supported by the C# extension. You will need full Visual Studio for that.

@gregg-miskelly gregg-miskelly changed the title Problem debugging .Net Core MVC application with TargetFramework net452 in Runtime x86 Debugger doesn't support debugging x86 processes on x64 Windows Aug 16, 2017
@gregg-miskelly
Copy link
Contributor

It doesn't look like we currently have an issue tracking the feature of debugging x86 process on x64 Windows. So I will leave this open to track that feature request.

This isn't something we are likely to get to anytime too soon. So I would suggest either compiling code so that it will run in an x64 process, or using full Visual Studio.

@cwistedt
Copy link
Author

Ok then i know the reason. Thanks! I just thought It was strange because when i changed to netcoreapp1.1 it could debug in x86.

@gregg-miskelly
Copy link
Contributor

One minor note: We actually don't support debugging .NET Core 32-bit processes either. Its just that .NET Core will nearly always use a 64-bit process, where as, in the Desktop framework, 32-bit is very common. If you have an 'AnyCPU' desktop binary, you can run in a 64-bit process by setting the Prefer32Bit property to false.

@ssiddhantsharma
Copy link

@cwistedt Completely unrelated, but I wanted to do this. I have some X64 assembly code that I want to debug, I tried hard but could not do it as I am just in 10th grade of high school.
Can you help me out finding the errors in the code. It is not long, just 70 lines.

@jscottPTC
Copy link

jscottPTC commented Jun 10, 2021

I am writing an app that will have to use a 32 bit version of ODBC. So my app will have to be 32 bit. It would be nice if I could develop this with vscode and omnisharp. So I would like this feature implemented as well.

@TanayBhalani
Copy link

@gregg-miskelly VS Code is a leading ide, supporting x86 will top it all and make it more independent ide.

It's a mess to go just for debugging to Visual Studio and do the rest in VS Code

@ThaDaVos
Copy link

So, any idea when we can expect this? I have a Clarion app (which currently only can be 32-bit) calling my external library - would love if I could debug this through VS Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants