Guest User

Untitled

a guest
Jul 22nd, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. Do[Pause[1]; a++, {50}]
  2.  
  3. CurrentValue[$FrontEnd, EvaluatorNames]
  4.  
  5. CurrentValue[$FrontEnd, {EvaluatorNames, "Debug"}] = {"AppendNameToCellLabel"->True}
  6.  
  7. CurrentValue[$FrontEnd, EvaluatorNames]
  8.  
  9. Dynamic[a, Evaluator->"Local"]
  10.  
  11. SetOptions[
  12. EvaluationNotebook[],
  13. StyleDefinitions -> Notebook[
  14. {
  15. Cell[StyleData[StyleDefinitions -> "Default.nb"]],
  16. Cell[StyleData["Input"],StyleKeyMapping -> {"Tab" -> "DebugInput"}],
  17. Cell[StyleData["DebugInput", StyleDefinitions->StyleData["Input"]],
  18. CellDingbat -> Cell[
  19. BoxData@FrameBox[
  20. ""inspect"",
  21. FrameStyle->RGBColor[0.8549`,0.83137`,0.72549`],
  22. ContentPadding->False,
  23. BaselinePosition->Baseline,
  24. RoundingRadius->5
  25. ],
  26. "Output",
  27. FontSize->8
  28. ],
  29. ShowCellLabel->False,
  30. "GeneratedCellStyles"->{"Output"->"DebugOutput"},
  31. Evaluator -> "Local 2",
  32. CellEvaluationFunction -> (
  33. With[{kernel = CurrentValue[EvaluationNotebook[], Evaluator]},
  34. ToExpression[
  35. #1,
  36. StandardForm,
  37. Function[
  38. Null,
  39. Dynamic[#1, Evaluator -> kernel],
  40. HoldAll
  41. ]
  42. ]
  43. ]&
  44. )
  45. ],
  46. Cell[StyleData["DebugOutput", StyleDefinitions->StyleData["Output"]],
  47. CellDingbat -> Cell[
  48. BoxData@FrameBox[
  49. ""value"",
  50. FrameStyle->RGBColor[0.8549`,0.83137`,0.72549`],
  51. ContentPadding->False,
  52. BaselinePosition->Baseline,
  53. RoundingRadius->5
  54. ],
  55. "Output",
  56. FontSize->8
  57. ],
  58. ShowCellLabel->False
  59. ]
  60. },
  61. StyleDefinitions -> "PrivateStylesheetFormatting.nb"
  62. ]
  63. ]
Add Comment
Please, Sign In to add comment