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

Support relative file only links in terminal (no folder) #88259

Closed
anirugu opened this issue Jan 8, 2020 · 13 comments
Closed

Support relative file only links in terminal (no folder) #88259

anirugu opened this issue Jan 8, 2020 · 13 comments
Assignees
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label
Milestone

Comments

@anirugu
Copy link

anirugu commented Jan 8, 2020

I am using a dotnet web project in vscode. I have some build error so when I run dotnet build, it's showing me some error.

I click on file and it doesn't open the file that is relative to the directory I have opened in my vs code.

@vscodebot vscodebot bot added the terminal General terminal issues that don't fall under another label label Jan 8, 2020
@connor4312
Copy link
Member

/needsMoreInfo

@vscodebot vscodebot bot added the info-needed Issue requires more information from poster label Jan 8, 2020
@connor4312 connor4312 removed terminal General terminal issues that don't fall under another label info-needed Issue requires more information from poster labels Jan 8, 2020
@vscodebot
Copy link

vscodebot bot commented Jan 8, 2020

Thanks for creating this issue! We figured it's missing some basic information or in some other way doesn't follow our issue reporting guidelines. Please take the time to review these and update the issue.

Happy Coding!

@anirugu
Copy link
Author

anirugu commented Jan 10, 2020

@connor4312 Here is the scenario

You installed VS code and installed the dotnet core and get started to program dotnet core app in VS code.

Now you create a project and open it in vs code. Normally how a developer does normally.
Now for testing change something in C# to make a broken code.

Now try to compile using powershell (integrated) in vs code. Now it will show you HomeController.cs have blah blah error.

Now when you click on the file name like HomeController in this case, sadly it doesn't open the file. I does this on windows machine.

So what someone opened is root of the project, In this case Controller/Homecontroller.cs
VS Code the relative path to the file. it must open the file when someone click on HomeController in Powershell integrated panel.

Note :- I am doing dotnet build from inside the terminal provided in VS Code.

@connor4312
Copy link
Member

This is the build output on my case on an Ubuntu VM. You're referring to Program.cs not being linkified?

connor@connor-lubuntu-vm:~/Github/HelloCS$ dotnet run
Program.cs(9,46): error CS1002: ; expected [/home/connor/Github/HelloCS/HelloCS.csproj]

The build failed. Fix the build errors and run again.

I can repro but I don't think this is something we'd likely recognize in VS Code with false positives elsewhere.

@anirugu
Copy link
Author

anirugu commented Jan 11, 2020

Few days ago when I tried this it's showing the (Powershell integrated) in terminal inside my vscode. I tried to click on that and it's not working. that's the issue.

I tried again and in all 3 and it's look working. Not sure what is breaking that time. Is there a way to check that powershell integrated thing in VS code. in those case it's not working.

@Tyriar
Copy link
Member

Tyriar commented Jan 13, 2020

@anirugu please share OS/version and VS Code version

@Tyriar Tyriar added the info-needed Issue requires more information from poster label Jan 13, 2020
@anirugu
Copy link
Author

anirugu commented Jan 14, 2020

I reset my windows last weekend. I have the stable version latest. When I was using it's showing some "Powershell Integrated" in terminal.

Can it happen because of some plugin. my user directory in C is intact as it is. I can see all my plugin get reinstalled after I installed the VS code in refresh window.

@Tyriar
Copy link
Member

Tyriar commented Jan 14, 2020

@anirugu open cmd.exe and run ver to get the exact Windows build number please.

@anirugu
Copy link
Author

anirugu commented Jan 15, 2020

Microsoft Windows [Version 10.0.18363.535]

@Tyriar
Copy link
Member

Tyriar commented Jan 15, 2020

What I suspect is happening is the file in question is getting output without any path separators which until #21125 won't work.

For example these type of paths should work:

src\Program.cs(1,2)
.\Program.cs(1,2)
..\Program.cs(1,2)

But this should not:

Program.cs(1,2)

Note also that the working directory that the terminal starts in is what all link are relative to on Windows as it's impossible to extract the cwd of a particular shell.

To verify this, could you show a screenshot of the terminal in the problem state to see the exact file?

@anirugu
Copy link
Author

anirugu commented Jan 16, 2020

I have reset my windows machine last week. I will reproduce this and let you know

@Konradox
Copy link

Microsoft Windows [Version 10.0.19041.153]
Powershell: 5.1.19041.1
VS Code: 1.43.2 (system setup)
VS Code Insider: 1.44.0-insider (system setup)
I can't click on links in the terminal:

  • relative,
  • absolute,
    I can click web URL

@Tyriar Tyriar changed the title clicking on link in power-shell integrated doesn't open the file Support relative file only links in terminal (no folder) Apr 6, 2020
@Tyriar Tyriar added feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label and removed info-needed Issue requires more information from poster labels Apr 6, 2020
@Tyriar Tyriar added this to the Backlog milestone Apr 6, 2020
@Tyriar
Copy link
Member

Tyriar commented Apr 6, 2020

Related: #21125

@anirugu anirugu closed this as completed Oct 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality terminal General terminal issues that don't fall under another label
Projects
None yet
Development

No branches or pull requests

4 participants