VCV Rack debug mode error: resource directory does not exist on Mac

I think i found the thread you’re referring to. So I did what you did and tried:

install_name_tool -change libRack.dylib "/Applications/VCV Rack 2 Free.app/Contents/Resources/libRack.dylib" path/to/my/module/plugin.dylib

But the same error still persists. Another thing I tried was to copy libRack.dylib to /usr/local/lib/ just to see if that fixes anything and initial error disappears but now it crashes when trying to load the preview to any plugin.

[4.462 info src/app/Browser.cpp:200 createPreview] Creating module widget np waveset-synth
2023-02-17 12:43:56.688008+0100 Rack[94794:1473125] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N4rack6widget6WidgetE, 19Waveset_synthWidget, N4rack3app10PortWidgetE.
2023-02-17 12:43:56.688025+0100 Rack[94794:1473125] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N4rack6widget6WidgetE, N4rack3app11PanelBorderE, N4rack3app10PortWidgetE.
2023-02-17 12:43:56.688034+0100 Rack[94794:1473125] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N4rack6widget6WidgetE, N4rack16componentlibrary11ScrewSilverE, N4rack3app10PortWidgetE.
2023-02-17 12:43:56.688041+0100 Rack[94794:1473125] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N4rack6widget6WidgetE, N4rack16componentlibrary11ScrewSilverE, N4rack3app10PortWidgetE.
2023-02-17 12:43:56.688066+0100 Rack[94794:1473125] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N4rack6widget6WidgetE, N4rack6widget15TransformWidgetE, N4rack3app10PortWidgetE.
2023-02-17 12:43:56.688081+0100 Rack[94794:1473125] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N4rack6widget6WidgetE, N4rack16componentlibrary11ScrewSilverE, N4rack3app10PortWidgetE.
2023-02-17 12:43:56.688093+0100 Rack[94794:1473125] dynamic_cast error 2: One or more of the following type_info's has hidden visibility or is defined in more than one translation unit. They should all have public visibility. N4rack6widget6WidgetE, N4rack16componentlibrary14RoundBlackKnobE, N4rack3app10PortWidgetE.
Assertion failed: (threadContext), function contextGet, file context.cpp, line 51.
libRack.dylib was compiled with optimization - stepping may behave oddly; variables may not be available.
Process 94794 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = hit program assert
    frame #4: 0x0000000119119ea1 libRack.dylib`rack::contextGet() (.cold.1) at context.cpp:51:2 [opt]
   48  	static thread_local Context* threadContext = NULL;
   49  	
   50  	Context* contextGet() {
-> 51  		assert(threadContext);
   52  		return threadContext;
   53  	}
   54  	
Target 0: (Rack) stopped.

Also building from source or reinstalling Rack doesn’t help. My overall goal is just to get some error and debugging messages when I’m running a custom plugin I’m building. Maybe there is another way?