Debugging Deepstream `infer_lstm.cpp` with gdb/VSCode Insight

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU) GPU
• DeepStream Version 6.2
• TensorRT Version 8.5.2
• NVIDIA GPU Driver Version (valid for GPU only) 525.78.01
• Issue Type( questions, new requirements, bugs) Question
• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

I am trying to have a normal debugging envioroment for a custom infer_lstm.cpp code I am writing. I am well aware and familiar with GST_DEBUG=7 and all the priniting methods - but I really need an option to have a live debugging session.

Iv’e tried placing breakpoints and used the attached makefiles with the following flags:
For the main deepstream-app:

%.o: %.c $(INCS) Makefile
	$(CC) -c -g -o $@ $(CFLAGS) $<

%.o: %.cpp $(INCS) Makefile
	$(CXX) -c -g -o $@ $(CFLAGS) $<

$(APP): $(OBJS) Makefile
	$(CXX) -g3 -o $(APP) $(OBJS) $(LIBS)

For the nvdsinferserver folder:

%.o: %.cc $(INCS) Makefile
	$(CXX) -c -g -o $@ $(CFLAGS) $<

%.o: %.cpp $(INCS) Makefile
	$(CXX) -c -g -o $@ $(CFLAGS) $<

%.o: %.cu $(INCS) Makefile
	@echo $(CFLAGS)
	$(NVCC) -c -g -o $@ --compiler-options '-fPIC -I../../includes/nvdsinferserver -I../../includes'  $<

$(LIB): $(OBJS) $(INCS) $(DEP) Makefile
	$(CXX) -g3 -o $@ $(LDFLAGS) $(OBJS)  $(LIBS)

Makefile - deepstream-app (2.7 KB)
Makefile - nvdsinferserver (5.4 KB)

But no matter how I launch or attach to the deepstream-app, I can’t get it to stop at any breakpoint of the infer_lstm.cpp file. Has anyone found a decent way to debug a plugin actually?

There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks

You can debug nvdsinferserver code with gdb. Please check whether the original libs have been replaced by the modified libs.