Unbound breakpoint issue when I try to add phone number support

Hi, I have an unbound breakpoint issue. I tried to add a phone number validation function to parse-server/RestWrite.js at master 路 parse-community/parse-server 路 GitHub

So, I followed this._validateEmail() example and created this._validatePhoneNumber() here phonecall_temp/RestWrite.js at main 路 hkbluesky/phonecall_temp 路 GitHub

However, when I tried to set a breakpoint in line 630 or line 631 in my RestWrite.js. The breakpoint becomes unbound. It is very strange and I don鈥檛 know why. Could anyone explain to me why this happens? BTW, I am using Visual Studio Code. Thanks

I think it is happening because we use Babel on Parse Server to generate the lib folder. I am not sure how breakpoints work exactly on VS Code in a project with Babel but you probably need to run npm run build before starting the tests.

@davimacedo yes. This solves the unbound breakpoint issue. But why do we need the lib folder when all the source code is in /src ? Is this because parse server actually reads code from /lib folder?

Yes. Babel 鈥渃ompiles鈥 the code from src folder and generates the lib, which is the one actually executed.