0

I'm trying to see the system.debug message in the output console log when I run the SFDX: Execute Anonymous Apex with Editor Contents, but it doesn't seem to want to appear. I've seen a lot of different articles about setting up an active trace flag and moving VScode into applications (I'm on a Mac) and out of downloads. However, can't seem to get it to work.

Alternatively, when I run the execute anonymous code command when the system.debug is on it own it works. Not sure where to go next.

enter image description here enter image description here

enter image description here enter image description here

1 Answer 1

0

Declaring a class doesn't cause the code contained in it (in constructors or methods) to be executed.

To execute the code in your constructor, you'll need to actually construct an instance of your class.

i.e. you need to add

Class_Test testInstance = new Class_Test();

after your class definition

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .