Incorrect sourcemaps -- is there a way to set them correctly?

  • I’m intentionally creating a typo to trigger an error for illustration:
  • Clicking on this error opens a blank file, as the path – /workspace//src/Thermostat.ino:9:31 doesn’t exist on my machine
  • The correct path would be /Users/dohnny/Particle/projects/thermal/src/Configuration.ino

I’ve seen this same path in some other errors on this site, but no one seems to be asking how to fix them? Is there some configuration I can set so that clicking these errors will open the files/lines that are broken?

Thanks!

I think it’s meant to be a relative path to where-ever you said your workspace is. So from that folder, follow the path. Not sure if there’s a fix, but seeing as Atom is open source, there’s probably a plug-in available.

1 Like

Thanks for taking the time to respond! I realize what it is ultimately referring to, but every once in awhile I click it and re-experience the disappointing empty editor.

For completeness I’ll also mention it always refers to files as .ino even though I have them as .cpp

I’m sure the Particle team has more important things to worry about but I look forward to a more polished experience :upside_down_face:

If you get a “wrong” file referenced in an error message, it’s most likely because you are not building the project you are intending to.
In order to have Dev build the correct project, you need to File - Open Folder... the one directory that contains the project.properties file of that particular project - no parent project or anything else exactly that folder.

And the error message there also suggests that you have forgotten to add #include "Particle.h" in your .cpp file(s).

I think this is related to the flatfile structure I think was prescribed prior to the v2 libraries and associated updates. So if you are carrying on with an older project, or had just copy and pasted source code from an old tutorial/the webide you may not have your custom libraries in /lib and project source in /src and instead have it all in root ?