Eli5 how to use console to debug a custom node

Describe the issue/error/question

Disclaimer - I am not a dev but have some python experience, mostly with pycharm ide and i believe it impacts my ability to understand ts\js debugging process in vscode. Also this is first time i attempt a js project.

I am making a custom node to wrap an existing js api wrapper and it works out well since i build it over existing codebase and I can debug my queries right in the node, more or less.

However i got stuck trying to implement a method to get list of folders and feed them to resourceLocator.
I need a tool to see what exactly happens when resourceLocator cqlls my method and what happens inside it.

I did my best to parse this forum and find something i can adopt, Tried to implement this env but no luck there.

It seems like I miss some basic node knowlege and\or project evolves faster then manuals.

I am trying to debug method I call with resourceLocator and I do not understand how to do it.

macos, VSCode,
n8n workflow based on GitHub - n8n-io/n8n-nodes-starter: Example starter module for custom n8n nodes.

Information on your n8n setup

  • **n8n version:**0.219.1

Hey @io_io,

Welcome to the community :raised_hands:

I don’t think there is currently a solid way to debug a custom node outside of just adding a bunch of console.log() lines to your project then checking the n8n output.

What I do though when I make mine is I will make a new local branch of the n8n project, Make my node in packages/nodes-base then I can just run n8n from source and test my node then once I am happy with everything it is a quick copy / paste into a copy of the n8n node template, give it one more test like that and all is good.

Hi @Jon

Thanks that sounds like I am not completely on wrong page.

browser console log ofc.

i am so distant from this frontend things tbh.

will dig further.

Thanks for your input

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.