user50238: I'm using the Visual Studio Code extension to develop for Arduino which works great.
It doesn't have a Serial Plotter like the regular Arduino IDE, which I need to debug this project. I can run the Arduino IDE's Serial Plotter alongside Visual Studio Code without too much of a problem.
However, if I try to compile and upload from Visual Studio Code while the Arduino IDE is running, the port is busy (not a surprise):
avrdude: ser_open(): can't open device "/dev/cu.usbmodem14201": Resource busy
An error occurred while uploading the sketch 

So I have to keep exiting and relaunching the Arduino IDE every time I build.
Anyone have a suggestion for how to work around this? Using an iMac as development environment.

user4143: Without very specialized software that can create two new devices with the correct "teeing" policy, it's not going to be possible.  Only one program can open a serial port at a time (certainly and have it get anything intelligible out of it...)
I would suggest you may want to add a second serial port.  Use an FT232 adaptor to communicate on another serial connection (or a SoftwareSerial connection at a pinch) for your debugging information.  You really want a board with more than one serial port for this - or a board with a native USB for programming and a hardware serial port for data communication.
Another alternative is to ditch the serial for programming altogether and program your board through a dedicated programmer, thus leaving your serial port free for data communication.

50238: <p>I'm using the <a href="https://marketplace.visualstudio.com/items?itemName=vsciot-vscode.vscode-arduino" rel="nofollow noreferrer">Visual Studio Code extension</a> to develop for Arduino which works great.</p>

<p>It doesn't have a Serial Plotter like the regular Arduino IDE, which I need to debug this project. I can run the Arduino IDE's Serial Plotter alongside Visual Studio Code without too much of a problem.</p>

<p>However, if I try to compile and upload from Visual Studio Code while the Arduino IDE is running, the port is busy (not a surprise):</p>

<pre><code>avrdude: ser_open(): can't open device "/dev/cu.usbmodem14201": Resource busy
An error occurred while uploading the sketch 
</code></pre>

<p>So I have to keep exiting and relaunching the Arduino IDE every time I build.</p>

<p>Anyone have a suggestion for how to work around this? Using an iMac as development environment.</p>
 4143: <p>Without very specialized software that can create two new devices with the correct "teeing" policy, it's not going to be possible.  Only one program can open a serial port at a time (certainly and have it get anything intelligible out of it...)</p>

<p>I would suggest you may want to add a second serial port.  Use an FT232 adaptor to communicate on another serial connection (or a SoftwareSerial connection at a pinch) for your debugging information.  You really want a board with more than one serial port for this - or a board with a native USB for programming and a hardware serial port for data communication.</p>

<p>Another alternative is to ditch the serial for programming altogether and program your board through a dedicated programmer, thus leaving your serial port free for data communication.</p>
