You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've started having an issue in one particular solution in a set of folders. When I try to debug a unit test so that I can step through the code, I get a message saying Could not load source <file path here> : Incorrect format of 'source' message... I have tried:
Modifying the launch.json and task.json files in the .vscode folder
Deleting and regenerating the launch.json and task.json files
Deleting and regenerating the bin and obj folders from the projects in the solution
I even tried re-creating the project in another folder. After creating a separate folder, I copied all of the files except the .vscode folder over into the new folder. I closed VS Code and re-opened it in the other folder. When I tried debugging, I was able to debug the same unit test and step through the code.
After seeing that I deleted everything in the original folder and I copied all of the files back to the original folder. I launched VS Code again and tried to debug the unit test and the same thing happened: it could load the source.
I don't understand why the same exact files work in one folder but not another. I know I'm missing something but I don't know what.
Steps to Reproduce
Create three new projects
A Web API project
A class librar project
An XUnit unit test project
Add some test classes to the class libary project. They can be some simple classes that are just DTOs.
Create a new unit test that uses one of the classes from the class library.
Make sure that there are a few steps so that a breakpoint can be set
Set a breakpoint somewhere in the unit test
Click the "Debug Test" text in the Code Lens
The breakpoint is not hit and a file window is opened with the message Could not load source : Incorrect format of 'source' message
Expected Behavior
Test stops at a breakpoint when debugging unit tests
Actual Behavior
Test does not stop at a breakpoint. Instead, a new file window is opened with the message Could not load source : Incorrect format of 'source' message.
When copying the files to a new folder and running the same tests, it works.
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:02.860][Start]textDocument/foldingRange
[LanguageServerHost] [06:58:02.866][End]textDocument/foldingRange
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:08.593][Start]textDocument/inlayHint
[LanguageServerHost] [06:58:08.593][End]textDocument/inlayHint
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:08.593][Start]textDocument/semanticTokens/range
[LanguageServerHost] [06:58:08.652][End]textDocument/semanticTokens/range
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:08.973][Start]codeLens/resolve
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:08.974][Start]codeLens/resolve
[LanguageServerHost] [06:58:08.978][End]codeLens/resolve
[LanguageServerHost] [06:58:08.978][End]codeLens/resolve
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:09.125][Start]textDocument/inlayHint
[LanguageServerHost] [06:58:09.125][End]textDocument/inlayHint
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:09.168][Start]textDocument/semanticTokens/range
[LanguageServerHost] [06:58:09.180][End]textDocument/semanticTokens/range
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:09.629][Start]textDocument/inlayHint
[LanguageServerHost] [06:58:09.629][End]textDocument/inlayHint
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:09.945][Start]textDocument/semanticTokens/range
[LanguageServerHost] [06:58:09.965][End]textDocument/semanticTokens/range
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:21.242][Start]textDocument/codeLens
[LanguageServerHost] [06:58:21.243][End]textDocument/codeLens
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] [06:58:21.526][Start]codeLens/resolve
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:21.534][Start]codeLens/resolve
[LanguageServerHost] [06:58:21.538][End]codeLens/resolve
[LanguageServerHost] [06:58:21.538][End]codeLens/resolve
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:44.460][Start]textDocument/codeLens
[LanguageServerHost] [06:58:44.461][End]textDocument/codeLens
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:58:44.742][Start]codeLens/resolve
[LanguageServerHost] [06:58:44.744][Start]codeLens/resolve
[LanguageServerHost] [06:58:44.746][End]codeLens/resolve
[LanguageServerHost] [06:58:44.748][End]codeLens/resolve
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:59:01.112][Start]textDocument/codeLens
[LanguageServerHost] [06:59:01.113][End]textDocument/codeLens
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:59:01.387][Start]codeLens/resolve
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [06:59:01.389][Start]codeLens/resolve
[LanguageServerHost] [06:59:01.396][End]codeLens/resolve
[LanguageServerHost] [06:59:01.398][End]codeLens/resolve
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [03:57:16.634][Start]textDocument/inlayHint
[LanguageServerHost] [03:57:16.635][End]textDocument/inlayHint
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [03:57:16.878][Start]textDocument/semanticTokens/range
[LanguageServerHost] [03:57:16.903][End]textDocument/semanticTokens/range
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [03:57:22.401][Start]textDocument/inlayHint
[LanguageServerHost] [03:57:22.401][End]textDocument/inlayHint
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [03:57:22.402][Start]textDocument/semanticTokens/range
[LanguageServerHost] [03:57:22.409][End]textDocument/semanticTokens/range
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:13:59.569][Start]textDocument/codeLens
[LanguageServerHost] [04:13:59.572][End]textDocument/codeLens
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:13:59.845][Start]codeLens/resolve
[LanguageServerHost] Using C# from data text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:13:59.850][Start]codeLens/resolve
[LanguageServerHost] [04:13:59.864][End]codeLens/resolve
[LanguageServerHost] [04:13:59.864][End]codeLens/resolve
[LanguageServerHost] No request parameters given, using default language handler
[LanguageServerHost] [04:14:03.183][Start]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] [04:14:03.201][End]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.367][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: DocumentCompilerSemantic) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.367][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.368][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: NonLocal) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.368][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.368][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: DocumentAnalyzerSemantic) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.368][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.369][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: XamlDiagnostics) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.369][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.369][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: DocumentAnalyzerSyntax) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.369][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.404][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: enc) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for OpenDocumentSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.404][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.405][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: HotReloadDiagnostics) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.405][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.405][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: syntax) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.406][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:03.406][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: WorkspaceDocumentsAndProject) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:03.406][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:07.803][Start]textDocument/_vs_getProjectContexts
[LanguageServerHost] [04:14:07.803][End]textDocument/_vs_getProjectContexts
[LanguageServerHost] No request parameters given, using default language handler
[LanguageServerHost] [04:14:07.804][Start]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] [04:14:07.804][End]workspace/buildOnlyDiagnosticIds
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.493][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: DocumentCompilerSemantic) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.494][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.496][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: NonLocal) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.496][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.496][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: DocumentAnalyzerSemantic) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.497][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: XamlDiagnostics) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.497][End]textDocument/diagnostic
[LanguageServerHost] [04:14:14.497][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.497][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: DocumentAnalyzerSyntax) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.497][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.530][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: enc) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for OpenDocumentSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.531][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.563][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: HotReloadDiagnostics) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.563][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.573][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: syntax) started getting diagnostics
[LanguageServerHost] previousResults.Length=1
[LanguageServerHost] Processing 1 documents
[LanguageServerHost] Diagnostics were unchanged for DocumentDiagnosticSource: c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs in UnitTests (net6.0)
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.573][End]textDocument/diagnostic
[LanguageServerHost] Using C# from request text document
[LanguageServerHost] c:\Users\someuser\Documents\Dev\MyProj\MySubProj\UnitTests\VmHelperTests.cs found in workspace Host
[LanguageServerHost] [04:14:14.574][Start]textDocument/diagnostic
[LanguageServerHost] PublicDocumentPullDiagnosticsHandler(category: WorkspaceDocumentsAndProject) started getting diagnostics
[LanguageServerHost] previousResults.Length=0
[LanguageServerHost] Processing 0 documents
[LanguageServerHost] Microsoft.CodeAnalysis.LanguageServer.Handler.Diagnostics.Public.PublicDocumentPullDiagnosticsHandler finished getting diagnostics
[LanguageServerHost] [04:14:14.578][End]textDocument/diagnostic
C# LSP Trace Logs
Had to remove these since the post body was too long...
Environment information
VSCode version: 1.93.1 C# Extension: 2.45.25 Using OmniSharp: false
Type: Bug
Issue Description
I've started having an issue in one particular solution in a set of folders. When I try to debug a unit test so that I can step through the code, I get a message saying
Could not load source <file path here> : Incorrect format of 'source' message..
. I have tried:I even tried re-creating the project in another folder. After creating a separate folder, I copied all of the files except the .vscode folder over into the new folder. I closed VS Code and re-opened it in the other folder. When I tried debugging, I was able to debug the same unit test and step through the code.
After seeing that I deleted everything in the original folder and I copied all of the files back to the original folder. I launched VS Code again and tried to debug the unit test and the same thing happened: it could load the source.
I don't understand why the same exact files work in one folder but not another. I know I'm missing something but I don't know what.
Steps to Reproduce
Could not load source : Incorrect format of 'source' message
Expected Behavior
Test stops at a breakpoint when debugging unit tests
Actual Behavior
Test does not stop at a breakpoint. Instead, a new file window is opened with the message
Could not load source : Incorrect format of 'source' message
.When copying the files to a new folder and running the same tests, it works.
Logs
ExtensionsLogFolder.zip
C# log
C# LSP Trace Logs
Had to remove these since the post body was too long...
Environment information
VSCode version: 1.93.1
C# Extension: 2.45.25
Using OmniSharp: false
Dotnet Information
Host:
Version: 8.0.8
Architecture: x64
Commit: 08338fcaa5
RID: win-x64
.NET SDKs installed:
The issue reporter said:
No SDKs were found.
but this is part of the info fromdotnet --info
:.NET runtimes installed:
Microsoft.NETCore.App 8.0.8 [c:\Users\jlrosenlof\AppData\Roaming\Code\User\globalStorage\ms-dotnettools.vscode-dotnet-runtime.dotnet\8.0.8~x64\shared\Microsoft.NETCore.App]
Other architectures found:
x86 [C:\Program Files (x86)\dotnet]
registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]
Environment variables:
Not set
global.json file:
Not found
Learn more:
https://aka.ms/dotnet/info
Download .NET:
https://aka.ms/dotnet/download
Visual Studio Code Extensions
Extension version: 2.45.25
VS Code version: Code 1.93.1 (38c31bc77e0dd6ae88a4e9cc93428cc27a56ba40, 2024-09-11T17:20:05.685Z)
OS version: Windows_NT x64 10.0.19045
Modes:
System Info
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: disabled_software
multiple_raster_threads: disabled_off
opengl: disabled_off
rasterization: disabled_software
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: disabled_software
video_encode: disabled_software
vulkan: disabled_off
webgl: unavailable_software
webgl2: unavailable_software
webgpu: unavailable_software
webnn: disabled_off
A/B Experiments
The text was updated successfully, but these errors were encountered: