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

Empty variables windows when stoped in HelloMvc sample on Win7 #258

Closed
mikes-gh opened this issue Apr 29, 2016 · 16 comments
Closed

Empty variables windows when stoped in HelloMvc sample on Win7 #258

mikes-gh opened this issue Apr 29, 2016 · 16 comments

Comments

@mikes-gh
Copy link

mikes-gh commented Apr 29, 2016

From https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger.md

•Requires .NET Core rc3-23829 or newer. These are daily builds of .NET Core that can be downloaded from the https://www.myget.org/F/dotnet-core/api/v3/index.json nuget feed. These are really daily builds of .NET Core and associated tools. So please continue if you want to dig in and have fun playing with new bits. But don't expect to go to production with those.

I am using aspnetcirelease feed. Does the above mean core debugging wont be available in rc2.
What are the practical steps for the above.

Another article I read misses this step.

Damian git cloned the project from https://github.com/aspnet/cli-samples

But when I try to debug HelloMvc I hit my breakpoint but get no variable info in the left hand panes at all.

no variables

@gregg-miskelly
Copy link
Contributor

@mikes-gh: sorry things are rather confusing at the moment since RC2 isn't quite out yet. The instructions in the master branch are directed at the version of the C# extension which is in the VS Code gallery. This version works with the version of the CLI on the .NET CLI getting-started page. If you want to use cli-samples, then you should follow these instructions: http://aka.ms/vscclrdogfood.

@mikes-gh
Copy link
Author

@gregg-miskelly I have downloaded the latest cli already.
I have followed those instructions
If I have other cli installed is that the issue?

@gregg-miskelly
Copy link
Contributor

@mikes-gh sorry I read the first part of your bug and thought you were running into mismatch problems (we have had a lot of those :)).

@mikes-gh
Copy link
Author

mikes-gh commented Apr 29, 2016

c:\Users\mikes\Repos\cli-samples\HelloMvc>dotnet --info
.NET Command Line Tools (1.0.0-rc2-002543)

Product Information:
 Version:     1.0.0-rc2-002543
 Commit Sha:  38d0c28a1e

Runtime Environment:
 OS Name:     Windows
 OS Version:  6.1.7601
 OS Platform: Windows
 RID:         win7-x64

c:\Users\mikes\Repos\cli-samples\HelloMvc>

I already had 2543 so issue still stands.
I have insider vscode 1.1.0
I have c# plugin 1.0.4 rc2

My launch.json

{
    "version": "0.2.0",
    "configurations": [
        {
            "name": ".NET Core Launch (console)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/HelloMvc.dll",
            "args": [],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": false
        },
        {
            "name": ".NET Core Launch (web)",
            "type": "coreclr",
            "request": "launch",
            "preLaunchTask": "build",
            "program": "${workspaceRoot}/bin/Debug/netcoreapp1.0/HelloMvc.dll",
            "args": [],
            "cwd": "${workspaceRoot}",
            "stopAtEntry": false,
            "launchBrowser": {
                "enabled": true,
                "args": "${auto-detect-url}",
                "windows": {
                    "command": "cmd.exe",
                    "args": "/C start ${auto-detect-url}"
                },
                "osx": {
                    "command": "open"
                },
                "linux": {
                    "command": "xdg-open"
                }
            }
        },
        {
            "name": ".NET Core Attach",
            "type": "coreclr",
            "request": "attach",
            "processName": "<example>"
        }
    ]
}

My Tasks.json

{
    "version": "0.1.0",
    "command": "dotnet",
    "isShellCommand": true,
    "args": [],
    "tasks": [
        {
            "taskName": "build",
            "args": [],
            "isBuildCommand": true,
            "problemMatcher": "$msCompile"
        }
    ]
}

My project.json

{
  "content": [
    "wwwroot",
    "Views"
  ],
  "compilationOptions": {
    "preserveCompilationContext": true,
    "emitEntryPoint": true,
    "debugType": "portable"
  },
  "dependencies" : {
    "Microsoft.AspNetCore.Diagnostics": "1.0.0-*",
    "Microsoft.AspNetCore.Mvc": "1.0.0-*",
    "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0-*",
    "Microsoft.AspNetCore.Server.Kestrel": "1.0.0-*",
    "Microsoft.AspNetCore.StaticFiles": "1.0.0-*",
    "Microsoft.Extensions.Logging.Console": "1.0.0-*",
    "Microsoft.NETCore.App": {
      "type": "platform",
      "version": "1.0.0-*"
    }
  },
  "frameworks": {
    "netcoreapp1.0": {
      "imports": [
        "portable-net45+wp80+win8+wpa81+dnxcore50",
        "portable-net451+win8"
      ]
    }
  },
  "tools": {
    "Microsoft.AspNetCore.Server.IISIntegration.Tools": {
      "version": "1.0.0-*",
      "imports": "portable-net45+wp80+win8+wpa81+dnxcore50"
    }
  },
  "scripts": {
    "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
  }
}

My copy of cli-samples
git clone https://mikes-bb@bitbucket.org/mikes-bb/cli-samples.git

@gregg-miskelly gregg-miskelly changed the title Setting up debugging Empty variables windows when stoped in HelloMvc sample Apr 29, 2016
@gregg-miskelly
Copy link
Contributor

I wasn't able to reproduce this problem. However, I am hoping that the fix for #173 addresses this as well. I will let you know once we have a release with that fix so you can see if that helps.

@mikes-gh
Copy link
Author

mikes-gh commented May 6, 2016

Now DNX is no longer.
dotnet/aspnetcore#1426
I was wondering what the status of this was. I know I'm on the bleeding edge and need to expect issues, but at the moment I have no IDE options with aspnetcirelease.

@gregg-miskelly
Copy link
Contributor

So 173, which I hope is the same as this, is fixed in our post-RC2 builds. We plan to push that out shortly after RC2. In the mean time you may be able to work around it (and confirm/deny my theory with) --

cd %USERPROFILE%.vscode\extensions\ms-vscode.csharp-1.0.5-rc2
Open %USERPROFILE%.vscode\extensions\ms-vscode.csharp-1.0.5-rc2\out\coreclr-debug\main.js in your favorite editor
Go to line 251
Add --
"System.IO.MemoryMappedFiles": "4.0.0-rc2-24027",
rmdir /s /q coreclr-debug\debugAdapters
Restart VS Code
Wait for the debugger download to complete
Verify that coreclr-debug\debugAdapters\System.IO.MemoryMappedFiles.dll exits

Hopefully you will find this works now. If not, I will send you more instructions on sending us a log of the problem.

@mikes-gh
Copy link
Author

mikes-gh commented May 6, 2016

I have this path

%USERPROFILE%.vscode-insiders\extensions\ms-vscode.csharp-1.0.4-rc2

Is that right?

@gregg-miskelly
Copy link
Contributor

If you are using the 1.0.4 version of the extension, you may need to slightly adjust the line number, but otherwise - yup.

@mikes-gh
Copy link
Author

mikes-gh commented May 8, 2016

Followed these instructions.. System.IO.MemoryMappedFiles.dll does exist but the problem remains the same so I think its different from 173

@gregg-miskelly
Copy link
Contributor

@mikes-gh: Thanks! In that case can you gather a debugger log for us to look at: https://github.com/OmniSharp/omnisharp-vscode/wiki/Enabling-C%23-debugger-logging

@mikes-gh
Copy link
Author

@gregg-miskelly
Sorry for delay long weekend here.
Here is the log.

cs-debug.log.txt

@gregg-miskelly gregg-miskelly changed the title Empty variables windows when stoped in HelloMvc sample Empty variables windows when stoped in HelloMvc sample on Win7 May 10, 2016
@gregg-miskelly
Copy link
Contributor

@mikes-gh Thanks! I can see the problem from this. This is an issue with our expression evaluator on Win7.

@gregg-miskelly
Copy link
Contributor

Here are the details for future searches

ExceptionType="System.DllNotFoundException"
Stack:

McgInterop.rometadata_dll_PInvokes.MetaDataGetDispenser(Guid* rclsid, Guid* riid, IntPtr* ppv)
McgInterop.rometadata_dll.MetaDataGetDispenser(Guid& rclsid, Guid& riid, IntPtr& ppv)
System.Reflection.Adds.MetadataDispenser.NativeCoreSystemMethods.MetaDataGetDispenser(Guid& rclsid, Guid& riid, IntPtr& ppv)\r\n   at System.Reflection.Adds.MetadataDispenser.GetDispenserShim()
System.Reflection.Adds.MetadataDispenser.OpenFromMemoryPe(IntPtr& rawMemory, Int32 size, Object memoryOwner)
System.Reflection.Adds.MetadataDispenser.OpenFromByteArray(Byte[] data)
Microsoft.VisualStudio.VIL.VisualStudioHost.VilTypeSystem.GetIntrinsicAssemblyBytesPtr(UInt32& size)
Microsoft.VisualStudio.Debugger.EntryPoint.IDkmClrIntrinsicAssemblyProvider_GetIntrinsicAssemblyMetaDataBytesPtr(IntPtr pvClassInfo, IntPtr ClrRuntimeInstance, UInt32& Size, IntPtr& MetaDataPtr)

HResult="0x80131524

gregg-miskelly added a commit to gregg-miskelly/vscode-csharp that referenced this issue Jun 6, 2016
This updates the clrdbg package to the 25406 build. This includes fixes
for Win7 expression evulation and the System.Task breaking change.

This addresses:
dotnet#258
gregg-miskelly added a commit to gregg-miskelly/vscode-csharp that referenced this issue Jun 6, 2016
This updates the clrdbg package to the 25406 build. This includes fixes
for Win7 expression evulation and the System.Task breaking change.
This addresses: dotnet#258

This also the MIEngine to pull in microsoft/MIEngine#353

Lastly this disables the external console by default. We decided to have it off
by default as we have seen some issues with it on OSX (ex: not always closing
when the target exits), and we are hoping it will be possible soon to use the
new VS Code console window instead. So we decided to turn it off by default, at
least for now.
gregg-miskelly added a commit that referenced this issue Jun 6, 2016
This updates the clrdbg package to the 25406 build. This includes fixes
for Win7 expression evulation and the System.Task breaking change.
This addresses: #258

This also the MIEngine to pull in microsoft/MIEngine#353

Lastly this disables the external console by default. We decided to have it off
by default as we have seen some issues with it on OSX (ex: not always closing
when the target exits), and we are hoping it will be possible soon to use the
new VS Code console window instead. So we decided to turn it off by default, at
least for now.
@gregg-miskelly
Copy link
Contributor

This should now be fixed. Install from https://github.com/OmniSharp/omnisharp-vscode/releases/tag/v1.1.4 for the fix. We hope to post this to the extension gallery soon.

@mikes-gh
Copy link
Author

mikes-gh commented Jun 7, 2016

I confirm variable window is now populated with fix

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

2 participants