Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

243
Views
JavaScript, how to debug imported library when not possible to recover console.log error?

In Package that Im using in Ionic Capacitor project, I have changed SoundFont player, It works great in that package, loads sf2 file and executes play action as well, when Im running that package on local host by npm start.

How ever, when I run my main project, there is no sound, I can see in console log that soundFont was successfully loaded by package Im using in my project, also excately the same SoundFont Im referencing from my main project and loading it successfully into it as well, and playing it too, Im also seeing all the console logs logged in package up to a point play action is used, but console logs immediately after that I can't see in my console log, so I presume, there is some error thrown or something, that stops executing code at that stage. but I don't know how to catch it. Also these errors probably aren't critical, as everything else works normally, including cursor that moves with every play call in package code. Otherwise, if soundFont isn't successfully loaded, both my main and package local servers crash on calling the play function.

https://github.com/enjikaka/sf2-player. --sf2 player im using in that package, package im using isn't public, so I can't share it.

console.log("key");
console.log(key);
console.log("sf2.noteOn(key)");
console.log(sf2.noteOn(key));

Upper 4 console logs I see in my console, bottom two console logs I can't see (though I see all of them when running package in local server, just that then everything works as expected, no errors thrown).

sf2.noteOn(sf2.noteOn(key));
setTimeout(() => sf2.noteOff(key), 500);
console.log("sf2.noteOn(key 22222)");
console.log(sf2.noteOn(key));

Is there a way to see what's happening with last four lines of code in my main project console log?

Also my main project is written in react, package is written in TypeScript

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!