Please enable JavaScript to view this site.

winIDEA Help

Version: 9.21.197

Locating the source code

Use the Directories page to:

Locate the source code referenced in Symbol Files, which is necessary to allow source-level debugging or

Use these examples to share a winIDEA workspace between your coworkers from a computer where the application was compiled to a computer where you want to start debugging.

 

 

You can locate files:

From View  / Symbols

From an open Editor document

If the original path to the source files is known

If the original path to the source files is unknown

Use relative paths to make the workspace configuration portable

 

 

Locating files from View / Symbols

The Symbols view shows Modules whose source are not found in grayed color.

 

locate-source

1. Right-click and select Locate Source.

2. Browse to the actual location of the clicked file and select it.

 

winIDEA will:

3. Determine the correct path conversion.

4. Adjust configuration in Debug menu / Configure Session / Application / Directories.

5. Try locating the sources (without breaking live session).

After this, the Symbols window and editor LoC (Line of Code) markers will be refreshed.

 

 

Locate files from an open Editor document

This use case assumes that you opened the correct source files manually.

 

locate-sources

1. Right-click in the Editor to open the context menu.

2. Via Associate to symbol file, select one of the presented paths (these are the paths that are reported in the Symbols File). If multiple applications or symbol files contain a file with this name, all will be presented. Make sure to select the one(s) who actually contain this exact file.

 

winIDEA will:

3. Determine the correct path conversion.

4. Adjust configuration in Debug menu / Configure Session / Application / Directories.

5. Try locating the sources (without breaking live session).

After this, the Symbols window and editor LoC (Line of Code) markers will be refreshed.

 

 

Original path to the source files is known

 

info-icon

For these examples we use:

Source files location of a compiled application: C:\Project

Source files location of a debugged application: L:\Mirror\Project

In the Directories page you can define source files if you know where the source files are located on both computers or if you don’t know the original path to the source files.

 

convert-source-file-paths

1. Go to the Debug menu / Configure Session / Application / Directories page.

2. Enable Convert source file paths.

3. Type into the field C:\Project=L:\Mirror\Project to replace the old path with the new path.

 

 

Original path to the source files is unknown

convert-source-file-paths2

1. Perform a Download. You can use the Demo Mode.

2. Go to the View menu / Debug / Symbols Browser.

3. Select Modules.

4. Click on one of the files and the path displays under the list of files.

5. Compare this path to the actual path and identify the required replacement.

convert-source-file-paths3

6. Go to the Debug menu / Configure Session / Application / Directories page.

7. Enable Convert source file paths.

8. Type into the field C:\Project=L:\Mirror\Project to replace the old path with the new path.

 

 

Use relative paths to make the workspace configuration portable

You may specify the new path relative to the workspace file, when the workspace file is located in the same folder hierarchy. If a winIDEA directory is created next to the sources the relative path from the workspace file in this case is ..\Project.

If you specify the relative path it will allow you to copy the entire L:\Mirror directory to any other location or PC and winIDEA will still locate the source code correctly.

 

Copyright© iSYSTEM AG Carl-Zeiss-Str.1 85247 Schwabhausen Germany