user35430: Given a simple mistake like
void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println("\");     // note: " is escaped, so this won't compile
}

This is rendered in Arduino IDE 2.0.3 as

and the problem is hard to spot.
The Jetbrains IDEs have special highlighting for escaped characters like

which makes the problem more obvious because the two quotation marks have different color.
Any chance that this can be configured in the new Arduino IDE 2.0.3 as well?
Because it was asked in the comments: no, the syntax highlighting does not highlight the escaped character when the string is complete. The backslash and quotation mark are both still green.


user88218: 
Any chance that this can be configured in the new Arduino IDE 2.0.3 as well?

Yes. You'll need to enable the Arduino language features provided by the language server. They're disabled by default.

Press F1,
Type Preferences: Open Settings (JSON),
Press Enter,
The settings.json file opens.

Add the following to the JSON and save it if you do not have auto-save enabled:
{
  "arduino.language.realTimeDiagnostics": true
}


My settings.json with the Arduino language features enabled.

Select a board. You can ignore the port selection if you like. The language feature should start, and you will see the error in the editor.

More details on the Advanced Settings are here.

35430: <p>Given a simple mistake like</p>
<pre class="lang-cpp prettyprint-override"><code>void setup() {
  Serial.begin(9600);
}

void loop() {
  Serial.println(&quot;\&quot;);     // note: &quot; is escaped, so this won't compile
}
</code></pre>
<p>This is rendered in Arduino IDE 2.0.3 as</p>
<p><a href="https://i.stack.imgur.com/bw9mn.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bw9mn.png" alt="Syntax highlighting in Arduino IDE 2.0" /></a></p>
<p>and the problem is hard to spot.</p>
<p>The Jetbrains IDEs have special highlighting for escaped characters like</p>
<p><a href="https://i.stack.imgur.com/8V10a.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8V10a.png" alt="Special highlighting of escape characters" /></a></p>
<p>which makes the problem more obvious because the two quotation marks have different color.</p>
<p>Any chance that this can be configured in the new Arduino IDE 2.0.3 as well?</p>
<p>Because it was asked in the comments: no, the syntax highlighting does not highlight the escaped character when the string is complete. The backslash and quotation mark are both still green.</p>
<p><a href="https://i.stack.imgur.com/Dbb6x.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Dbb6x.png" alt="Complete string" /></a></p>
 88218: <blockquote>
<p>Any chance that this can be configured in the new Arduino IDE 2.0.3 as well?</p>
</blockquote>
<p>Yes. You'll need to enable the Arduino language features provided by the <a href="https://github.com/arduino/arduino-language-server" rel="nofollow noreferrer">language server</a>. They're disabled by default.</p>
<ul>
<li>Press <kbd>F1</kbd>,</li>
<li>Type <code>Preferences: Open Settings (JSON)</code>,</li>
<li>Press <kbd>Enter</kbd>,</li>
<li>The <code>settings.json</code> file opens.</li>
</ul>
<p>Add the following to the JSON and save it if you do not have auto-save enabled:</p>
<pre class="lang-json prettyprint-override"><code>{
  &quot;arduino.language.realTimeDiagnostics&quot;: true
}
</code></pre>
<p><a href="https://i.stack.imgur.com/NS79o.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NS79o.png" alt="enter image description here" /></a></p>
<p>My <code>settings.json</code> with the Arduino language features enabled.</p>
<p><a href="https://i.stack.imgur.com/FJn8T.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FJn8T.png" alt="enter image description here" /></a></p>
<p>Select a board. You can ignore the port selection if you like. The language feature should start, and you will see the error in the editor.</p>
<p><a href="https://i.stack.imgur.com/qg8Zk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/qg8Zk.png" alt="enter image description here" /></a></p>
<p>More details on the <em>Advanced Settings</em> are <a href="https://github.com/arduino/arduino-ide/blob/main/docs/advanced-usage.md" rel="nofollow noreferrer">here</a>.</p>
