For a simple demostration of the behavior, note that the print statements in this expression appear in the Messages window: Column[{Slider[Dynamic[x]], Dynamic[Print[x]; x]}]
This behavior of Dynamic[] is not clear from the documentation that I reviewed, though it is possible/likely that I'm not sufficiently skilled in navigating the documentation.
Additionally, I found that under certain circumstances an error in this expression will cause what seems to be pathological printing behavior, In the following example, (which throws a huge error highlighting and may cause lag on your front end, test with caution. I discovered this using the following (editted into a small working example):
BeginPackage["Test`"];
testDynamic::usage = "";
testFun1::usage = "";
testFun2::usage = "";
Begin["`Private`"]
testDynamic[img_] := Manipulate[
Module[{controlTable, hm, hm0, out},
controlTable = {{"(xc, yc)=", xc, yc}, {"(dx,dy)=", dx, dy}};
hm = testFun1[testFun2[img, {xc, yc}, {dx, dy}]];
Row[{controlTable // TableForm, hm}]],
{{xc, 150}, 0, 500, 1}, {{yc, 150}, 0, 300, 1}, {{dx, 50}, 1, 500,
1}, {{dy, 50}, 1, 300, 1}]
testFun1[img_] := Module[{}, Print["In testFun1"]; MatrixPlot[img]]
testFun2[arr_, center_List, halfWidths_List] :=
Module[{dims, bottom, top, right, left, edges, out},
dims = Dimensions@arr;
Print["in testFun2"];
left = Max[1, center[[2]] - halfWidths[[2]]];
right = Min[dims[[2]], center[[2]] + halfWidths[[2]]];
bottom = Min[dims[[1]], center[[1]] + halfWidths[[1]]];
top = Max[1, center[[1]] - halfWidths[[1]]];
edges = {{top, bottom}, {left, right}};
out = Take[arr, Sequence @@ edges];
out]
End[];
EndPackage[];
img = RandomInteger[255, {250, 350}];
testDynamic[img]
The image previewer can be thrown into a error state by dragging the top slider to the right. When that occurs, the Print messages do begin to leak into the Front End.
My first question is admittedly a mostly academic one, since it seems clear that in most situations, this would horrifically clog up the front end. But perhaps others are aware of a case where one might want to brick the front end in this way? Hence my second question, to which i think the answer is "Probably Not"
Related: Printing a Dynamic variable inside Dynamic
EDIT: It seems that the sporadic printing to the Front End instead of the Messages window occurs in the absence of an error when the computation starts causing the front end to lag.
Column[{Slider[Dynamic[y]], Dynamic[Print[y]; y, SynchronousUpdating -> False]}]which uses asynchronous updating like regular Shift+Enter. $\endgroup$