SublimeDebugger icon indicating copy to clipboard operation
SublimeDebugger copied to clipboard

The result can't be fetched immediately when the expression be watched

Open huanzai opened this issue 1 year ago • 0 comments

		self.dispose_add(
			self.breakpoints.data.on_send.add(self.on_send_data_breakpoints),
			self.breakpoints.function.on_send.add(self.on_send_function_breakpoints),
			self.breakpoints.filters.on_send.add(self.on_send_filters),
			self.breakpoints.source.on_send.add(self.on_send_source_breakpoint),

		)

		self.watch = watch
		self.watch.on_added.add(lambda expr: self.watch.evaluate_expression(self, expr))

I try to fix it

		self.watch = watch
		@core.run # async function
		def on_added_expression(expr):
			return self.watch.evaluate_expression(self, expr)

		self.dispose_add(
			self.breakpoints.data.on_send.add(self.on_send_data_breakpoints),
			self.breakpoints.function.on_send.add(self.on_send_function_breakpoints),
			self.breakpoints.filters.on_send.add(self.on_send_filters),
			self.breakpoints.source.on_send.add(self.on_send_source_breakpoint),
			self.watch.on_added.add(on_added_expression), # dispose when session expired
		)

huanzai avatar Dec 07 '24 03:12 huanzai