How can I get a jump to specific line in external editor?

Technical Note 83609

Architectures:

All

Component:

IDE

Updated:

2/8/2018 6:14 AM

Introduction

The IAR Embedded Workbench™ can send command line arguments to your external editor to make the external editor select a specific line in a source file.

Discussion

You add (in Tools>Options) command line arguments for your external editor.

Example using Notepad++

Assume this message (which refers to line 31) is seen in the Build windowe:

Error[Pe020]: identifier "P_1OUT" is undefined C:\Users\PerDA\Documents\IAR Embedded Workbench\430\FET_examples\FET_examples\msp430x1xx\C-source\msp430x1xx_fet_1.c 31

To open your external editor on line 31, you need to add some settings in the IAR Embedded Workbench.

You should take these actions:

  • Select Tools>Options>Editor>External Editor
  • Select Use External Editor
  • In the Type drop-down menu select Command Line.
  • Enter Editor: C:\Program Files (x86)\Notepad++\notepad++.exe
  • Enter Arguments: "$FILE_PATH$" -n$CUR_LINE$

Using other external editors

You must check the documentation of your editor for corresponding argument(s).

Conclusion

You can set command line arguments to jump from the Build window to the specific code line in your external editor.

All product names are trademarks or registered trademarks of their respective owners.

We do no longer support Internet Explorer. To get the best experience of iar.com, we recommend upgrading to a modern browser such as Chrome or Edge.