Questions tagged [go-to-definition]

69 questions
2
votes
0 answers

Visual Studio: automatically expand destination of Go To Definition?

I'll admit, this is terribly finicky. When I use Go To Definition on a method, I hate arriving at the destination to find it is collapsed. I then have to locate the method, mouse over to the side, and click the plus sign, or Ctrl+M, Ctrl+M. SECONDS…
friggle
  • 3,362
  • 3
  • 35
  • 47
2
votes
2 answers

Can I see the "final" C# code when viewing an interface's methods?

What I'm trying to say is, if an object is defined as an interface, then instantiated from a class factory, is it possible in VS 2008 to right click on a method call from that object and see the real code, instead of the interface's empty…
larryq
  • 15,713
  • 38
  • 121
  • 190
1
vote
2 answers

"Go to definition" from PyDev not work in External Library files

When I am in certain files, for example, External Library files, I am getting this behavior where the Go To Definition command jumps me to the import statement at the top of the file instead of opening the file with the real definition. For example,…
Cykooz
  • 11
  • 4
1
vote
1 answer

VS2010: Going to definition for a C# member in a VB.NET project (and vice versa)

I have a solution with a C# project and a VB.NET project. The VB.NET project references the C# project. When I am in the VB.NET project and want to go to definition of an object member located in the C# project, VS takes me to the object browser…
oscilatingcretin
  • 10,457
  • 39
  • 119
  • 206
1
vote
0 answers

Enabling Go to Implementation with declaration maps if the library doesn't include TS sources in its NPM package

I can set inlineSources: true and the TypeScript compiler will put my TS sources into the sourcesContent attribute of the source map file. Is there any way to do the same thing with a declaration map file generated by setting declarationMap: true ? …
Justin Grant
  • 44,807
  • 15
  • 124
  • 208
1
vote
1 answer

How can I use "Go To Definition" for CommonJS `require`s in VS Code when the path to resolve is derived using runtime functions and values?

I want to be able to use Go to definition feature in VS Code for path such as: const path = require('path'); const mypath = require(path.resolve('my', 'path')); How can I configure in a way for VS Code to recognize those paths? Here is an example…
1
vote
0 answers

How to go to definition for a module in agda on vsc

In visual studio code, the go to definition doesn't work for agda modules. I checked the key-bindings for agda-mode and the only one useful seemed c-c c-o but that doesn't seem to find some loaded modules and gives Panic: Unbound…
kuco 23
  • 786
  • 5
  • 18
1
vote
0 answers

In vscode 'go to definition' doesn't work with import modules in .js files when alias is used

I have vue project. Go to definition works fine in .vue files, either I use alias or not. But in .js files 'go to definition' works only if I don't use alias (checked with the same module). It strange for me since jsconfig.json is the same. …
1
vote
1 answer

Implement "Navigate To Definition" (Ctrl+Click) in Visual Studio extension

I am writing a Visual Studio extension and I want to implement the Ctrl + Click command for my own file type. This is similar to the C#/C++ editor whereby Ctrl + clicking on a type name will take user to the definition of that type (aka. Go To…
1
vote
1 answer

(neo)vim coc - go-to-definition for html css

I was looking for a solution but never found a good one. Does anyone use COC for html css. How to go to definition in css file from class or ID in html file? Thanks for any help!
user3160862
1
vote
0 answers

"Go To Definition" for named exports works differently between JavaScript and TypeScript?

Given a file structure like this: ├── main.js └── util └── stuff.js And some contents like this: // stuff.js export function add(a, b) { return a + b; } // main.js import * as maths from './util/stuff.js' maths.add(1, 2) When I attempt…
1
vote
1 answer

Go to Definition of class only showing public members

When I right click on a class (that is part of an third party assembly - not code I have written) in Visual Studio and select "Go to Definition", I can see all the methods, properties etc of the class. I notice all these are all public and no…
SE1986
  • 2,534
  • 1
  • 10
  • 29
1
vote
1 answer

Visual Studio 2017 "Go To Definition" for partial classes

In our solution, we work with many partial classes. The implementation is spread over 2 files, whereas one of the files only contains auto generated code. When I press F12 (Go to Definition) on instances of such classes, VS 2017 displays a list of…
1
vote
1 answer

Go to definition from text position with roslyn

How to get file name and position of definition of any symbol under the current custom position and file (within project or solution)? I do the following steps (simplified explanation): Create collection of syntax trees and compilation by the…
Ivan Kochurkin
  • 4,413
  • 8
  • 45
  • 80
1
vote
3 answers

visual studio 2012 c# go to definition always returns metadata

ide: vs 2012 v11.0.60610.01 update 3 project: web site, mix of vb and c# problem: vb navigates to definition, c# navigates to metadata complaint: complete pain in the ass when managing a 30k code-line project. solution: you be the first to…