# \[DEBUG\] Cursor in Scripting

**URL:** <https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549>\
**Category:** Ignition Early Access\
**Created:** [February 13, 2019, 5:44pm UTC](https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549 "2019-02-13T17:44:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![andrea.morando](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrea.morando/32/8039_2.png) [@andrea.morando](https://forum.inductiveautomation.com/u/andrea.morando)\
**Post date:** [February 13, 2019, 5:44pm UTC](https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549/1 "2019-02-13T17:44:32Z")

</div>

Dears,  
I have installed the build **b2019021202** on Windows Server 2016.  
When I opened a designer on a Windows 10, I noticed a strange behavior on editing a script: the cursor does not match the screen position.  
I tried to open a designer on Linux and the behavior is ok.  
I post a video to better clarify.

[ScriptEditor.zip](https://us1.discourse-cdn.com/inductiveautomation/original/2X/1/19c9f2cf8ad2e418223aaf4dbd0914f7c8a59b07.zip) (407.8 KB)

Thank you so much.  
Andrea

---

<div class="post-metadata">

**Author:** ![jcoffman](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/jcoffman/32/6429_2.png) [@jcoffman](https://forum.inductiveautomation.com/u/jcoffman)\
**Post date:** [February 13, 2019, 5:50pm UTC](https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549/2 "2019-02-13T17:50:38Z")

</div>

@andrea.morando this should be fixed in the todays build. Upgrade the build and clear out the runtime cache for your client/designer in .ignition/cache/resources/ (delete the runtimes dir there) and relaunch. It will grab an updated version of the runtime from the gateway. Let me know if there are any other issues. once you confirm it go ahead and mark this as solved.

Thanks!  
Jonathan C

---

<div class="post-metadata">

**Author:** ![andrea.morando](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/andrea.morando/32/8039_2.png) [@andrea.morando](https://forum.inductiveautomation.com/u/andrea.morando)\
**Post date:** [February 15, 2019, 7:51am UTC](https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549/3 "2019-02-15T07:51:53Z")

</div>

Thank you Jonathan. Now it works fine!

---

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [March 31, 2019, 10:54pm UTC](https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549/4 "2019-03-31T22:54:30Z")

</div>

I’m having a very similar problem: Anywhere I click, the cursor ends up off to the right of wherever I clicked, further right the further into the window it is. I’d say the effect is maybe only 2-3% off.

A second oddity: On lines with long strings in them (no non-ASCII characters), the cursor will go completely off the rails, again floating to the left of where it actually is, as in the video posted above. It only seems to happen around long strings; long lines of code will keep the cursor where it’s supposed to be, even if it doesn’t match where I click. The effect is very small, maybe only 1%, but it eventually passes multiple characters.

At first I was thinking it was because I’m logging into Server 2012R2 to develop, but I just tested entirely locally and get the same behavior.

Windows 10 1809, monitor is 4K at 175% zoom. Latest nightly build.

---

<div class="post-metadata">

**Author:** ![Steve\_Laubach](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/steve_laubach/32/60900_2.png) [@Steve\_Laubach](https://forum.inductiveautomation.com/u/Steve_Laubach)\
**Post date:** [April 1, 2019, 2:39pm UTC](https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549/5 "2019-04-01T14:39:57Z")

</div>

This problem has happened in the past. Sometimes the problem persists after it has been fixed in the patch.

The resolution for that problem is to clear your cache. See this thread.

> [@\[BUG-12519\] Scripting character / cursor position](http://forum.inductiveautomation.com/t/bug-12519-scripting-character-cursor-position/22432):
>
> Not sure if this is happening for a lot of folks. The character cursor on the scripting tab for all components doesn’t correctly line up with its actual position. Its impossible to deal with. Its sometimes up to 2 characters off, so you cant pick or type where you want to. The scripting console is unaffected. Windows 10

---

<div class="post-metadata">

**Author:** ![silverbacknet](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/silverbacknet/32/7385_2.png) [@silverbacknet](https://forum.inductiveautomation.com/u/silverbacknet)\
**Post date:** [April 1, 2019, 7:09pm UTC](https://forum.inductiveautomation.com/t/debug-cursor-in-scripting/22549/6 "2019-04-01T19:09:00Z")

</div>

I actually removed the entire .ignition folder and started from scratch on my local workstation first. No cache, everything was rebuilt from scratch. Good to see there’s a specific bug thread for it though, I’ll follow up there.
