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

Technical Note 83609

Arkitekturer:

All

Komponent:

IDE

Uppdaterad:

2022-05-30 11:49

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 window:

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.

Det här innehållet finns tyvärr inte på svenska.

Vår webbplats finns främst på vårt koncernspråk engelska, förutom det innehåll för investerare som vi är lagstadgade att kommunicera på svenska. Vi rekommenderar att du besöker vår globala webbplats på engelska för att få en bättre upplevelse.

Vi stöder inte längre Internet Explorer. För att få bästa möjliga upplevelse av iar.com rekommenderar vi att du uppgraderar till en modern webbläsare som Chrome eller Edge.