100% found this document useful (3 votes)
29 views

Visual Studio Code Distilled: Evolved Code Editing for Windows, macOS, and Linux - Third Edition Alessandro Del Sole all chapter instant download

Evolved

Uploaded by

varioseror6c
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (3 votes)
29 views

Visual Studio Code Distilled: Evolved Code Editing for Windows, macOS, and Linux - Third Edition Alessandro Del Sole all chapter instant download

Evolved

Uploaded by

varioseror6c
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 41

Download the Full Version of ebook for Fast Typing at ebookmass.

com

Visual Studio Code Distilled: Evolved Code Editing


for Windows, macOS, and Linux - Third Edition
Alessandro Del Sole

https://ebookmass.com/product/visual-studio-code-distilled-
evolved-code-editing-for-windows-macos-and-linux-third-
edition-alessandro-del-sole/

OR CLICK BUTTON

DOWNLOAD NOW

Download More ebook Instantly Today - Get Yours Now at ebookmass.com


Recommended digital products (PDF, EPUB, MOBI) that
you can download immediately if you are interested.

Visual Studio Code Distilled: Evolved Code Editing for


Windows, macOS, and Linux 3 / converted Edition Alessandro
Del Sole
https://ebookmass.com/product/visual-studio-code-distilled-evolved-
code-editing-for-windows-macos-and-linux-3-converted-edition-
alessandro-del-sole/
ebookmass.com

International Residential Code for One- and Two-Family


Dwellings (International Code Council Series) 2018 1st
Edition International Code Council
https://ebookmass.com/product/international-residential-code-for-one-
and-two-family-dwellings-international-code-council-series-2018-1st-
edition-international-code-council/
ebookmass.com

International Fire Code (International Code Council


Series) 2021 1st Edition International Code Council

https://ebookmass.com/product/international-fire-code-international-
code-council-series-2021-1st-edition-international-code-council/

ebookmass.com

International Zoning Code (international Code Council


Series) 2018 International Code Council

https://ebookmass.com/product/international-zoning-code-international-
code-council-series-2018-international-code-council/

ebookmass.com
IBC International Building Code (International Code
Council Series) 2018 1st Edition International Code
Council
https://ebookmass.com/product/ibc-international-building-code-
international-code-council-series-2018-1st-edition-international-code-
council/
ebookmass.com

International Energy Conservation Code (International Code


Council Series) 2018 1st Edition International Code
Council
https://ebookmass.com/product/international-energy-conservation-code-
international-code-council-series-2018-1st-edition-international-code-
council/
ebookmass.com

Let's Code It! 2022-2023 Code Edition Shelley Safian

https://ebookmass.com/product/lets-code-it-2022-2023-code-edition-
shelley-safian/

ebookmass.com

IPMC International Property Maintenance Code


(International Code Council Series) 2018 1st Edition
International Code Council
https://ebookmass.com/product/ipmc-international-property-maintenance-
code-international-code-council-series-2018-1st-edition-international-
code-council/
ebookmass.com

International Swimming Pool and Spa Code 2021 1st Edition


International Code Council

https://ebookmass.com/product/international-swimming-pool-and-spa-
code-2021-1st-edition-international-code-council/

ebookmass.com
Visual Studio
Code Distilled
Evolved Code Editing for Windows,
macOS, and Linux

Third Edition

Alessandro Del Sole
Visual Studio Code
Distilled
Evolved Code Editing for Windows,
macOS, and Linux
Third Edition

Alessandro Del Sole


Visual Studio Code Distilled: Evolved Code Editing for Windows, macOS, and Linux
Alessandro Del Sole
Cremona, Italy

ISBN-13 (pbk): 978-1-4842-9483-3 ISBN-13 (electronic): 978-1-4842-9484-0


https://doi.org/10.1007/978-1-4842-9484-0

Copyright © 2023 by Alessandro Del Sole


This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the
material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation,
broadcasting, reproduction on microfilms or in any other physical way, and transmission or information
storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now
known or hereafter developed.
Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with
every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an
editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the
trademark.
The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not
identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to
proprietary rights.
While the advice and information in this book are believed to be true and accurate at the date of publication,
neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or
omissions that may be made. The publisher makes no warranty, express or implied, with respect to the
material contained herein.
Managing Director, Apress Media LLC: Welmoed Spahr
Acquisitions Editor: Smriti Srivastava
Development Editor: Laura Berendson
Coordinating Editor: Mark Powers
Copy Editor: Kezia Endsley
Cover designed by eStudioCalamar
Cover image designed by Freepik (www.freepik.com)
Distributed to the book trade worldwide by Springer Science+Business Media New York, 1 New York Plaza,
Suite 4600, New York, NY 10004-1562, USA. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders-ny@
springer-sbm.com, or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole
member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc
is a Delaware corporation.
For information on translations, please e-mail booktranslations@springernature.com; for reprint,
paperback, or audio rights, please e-mail bookpermissions@springernature.com.
Apress titles may be purchased in bulk for academic, corporate, or promotional use. eBook versions and
licenses are also available for most titles. For more information, reference our Print and eBook Bulk Sales
web page at http://www.apress.com/bulk-sales.
Any source code or other supplementary material referenced by the author in this book is available to
readers on GitHub (github.com/apress). For more detailed information, please visit http://www.apress.
com/source-code.
Printed on acid-free paper
To my wonderful wife, Angelica. You are my reason to live.
Table of Contents
About the Author��������������������������������������������������������������������������������������������������� xiii

Acknowledgments���������������������������������������������������������������������������������������������������xv
Introduction�����������������������������������������������������������������������������������������������������������xvii

Chapter 1: Introducing Visual Studio Code��������������������������������������������������������������� 1


Visual Studio Code, a Cross-Platform Development Tool�������������������������������������������������������������� 1
When and Why Visual Studio Code������������������������������������������������������������������������������������������������ 2
Installing and Configuring Visual Studio Code������������������������������������������������������������������������������ 4
Installing Visual Studio Code on Windows������������������������������������������������������������������������������� 6
Installing Visual Studio Code on macOS���������������������������������������������������������������������������������� 8
Installing Visual Studio Code on Linux������������������������������������������������������������������������������������� 9
Localization Support�������������������������������������������������������������������������������������������������������������� 11
Updating Visual Studio Code�������������������������������������������������������������������������������������������������� 12
Previewing Features with Insiders Builds����������������������������������������������������������������������������� 14
Visual Studio Code on Web���������������������������������������������������������������������������������������������������� 16
Summary������������������������������������������������������������������������������������������������������������������������������������ 17

Chapter 2: Getting to Know the Environment��������������������������������������������������������� 19


The Welcome Page���������������������������������������������������������������������������������������������������������������������� 19
The Code Editor��������������������������������������������������������������������������������������������������������������������������� 21
Reordering, Resizing, and Zooming Editor Windows������������������������������������������������������������� 22
The Status Bar���������������������������������������������������������������������������������������������������������������������������� 22
The Activity Bar��������������������������������������������������������������������������������������������������������������������������� 23
The Side Bar�������������������������������������������������������������������������������������������������������������������������������� 24
The Explorer Bar�������������������������������������������������������������������������������������������������������������������� 24
The Search Tool��������������������������������������������������������������������������������������������������������������������� 30

v
Table of Contents

The Git Bar����������������������������������������������������������������������������������������������������������������������������� 31


The Run and Debug Bar��������������������������������������������������������������������������������������������������������� 32
The Extensions Bar���������������������������������������������������������������������������������������������������������������� 33
The Accounts Button������������������������������������������������������������������������������������������������������������� 34
The Settings Button��������������������������������������������������������������������������������������������������������������� 36
Navigating Between Files����������������������������������������������������������������������������������������������������������� 36
The Command Palette����������������������������������������������������������������������������������������������������������������� 37
The Panels Area�������������������������������������������������������������������������������������������������������������������������� 38
The Problems Panel��������������������������������������������������������������������������������������������������������������� 38
The Output Panel������������������������������������������������������������������������������������������������������������������� 40
The Debug Console Panel������������������������������������������������������������������������������������������������������ 40
Working with the Terminal����������������������������������������������������������������������������������������������������� 41
Summary������������������������������������������������������������������������������������������������������������������������������������ 43

Chapter 3: Language Support and Code Editing Features�������������������������������������� 45


Language Support����������������������������������������������������������������������������������������������������������������������� 45
Working with C# and C++����������������������������������������������������������������������������������������������������� 46
Working with Python������������������������������������������������������������������������������������������������������������� 47
Working with Julia����������������������������������������������������������������������������������������������������������������� 48
Working with Go�������������������������������������������������������������������������������������������������������������������� 48
Basic Code Editing Features������������������������������������������������������������������������������������������������������� 48
Working with Text������������������������������������������������������������������������������������������������������������������ 49
Syntax Colorization���������������������������������������������������������������������������������������������������������������� 50
Delimiter Matching and Text Selection���������������������������������������������������������������������������������� 51
Code Block Folding���������������������������������������������������������������������������������������������������������������� 52
Multicursors�������������������������������������������������������������������������������������������������������������������������� 52
Reusable Code Snippets�������������������������������������������������������������������������������������������������������� 53
Word Completion������������������������������������������������������������������������������������������������������������������� 54
Minimap Mode����������������������������������������������������������������������������������������������������������������������� 55
Sticky Scroll��������������������������������������������������������������������������������������������������������������������������� 56
Whitespace Rendering and Breadcrumbs����������������������������������������������������������������������������� 57
Markdown Preview���������������������������������������������������������������������������������������������������������������� 58

vi
Table of Contents

Evolved Code Editing������������������������������������������������������������������������������������������������������������������� 59


Working with IntelliSense������������������������������������������������������������������������������������������������������ 60
Parameter Hints��������������������������������������������������������������������������������������������������������������������� 62
Inline Documentation with Tooltips��������������������������������������������������������������������������������������� 63
Go to Definition and Peek Definition�������������������������������������������������������������������������������������� 64
Go to Implementation and Peek Implementations����������������������������������������������������������������� 66
Finding References���������������������������������������������������������������������������������������������������������������� 67
Renaming Symbols and Identifiers���������������������������������������������������������������������������������������� 70
Live Code Analysis����������������������������������������������������������������������������������������������������������������� 72
Hints About IntelliCode���������������������������������������������������������������������������������������������������������� 80
Summary������������������������������������������������������������������������������������������������������������������������������������ 80

Chapter 4: Working with Files and Folders������������������������������������������������������������ 81


Visual Studio Code and Project Systems������������������������������������������������������������������������������������ 81
Working with Individual Files������������������������������������������������������������������������������������������������������ 82
Creating Files������������������������������������������������������������������������������������������������������������������������� 84
File Encoding, Line Terminators, and Line Browsing������������������������������������������������������������� 86
Working with Folders and Projects��������������������������������������������������������������������������������������������� 87
Opening a Folder������������������������������������������������������������������������������������������������������������������� 88
Opening .NET Solutions��������������������������������������������������������������������������������������������������������� 90
Opening JavaScript and TypeScript Projects������������������������������������������������������������������������� 91
Opening Loose Folders���������������������������������������������������������������������������������������������������������� 92
Working with Workspaces����������������������������������������������������������������������������������������������������������� 92
Creating Workspaces������������������������������������������������������������������������������������������������������������� 95
Opening Existing Workspaces����������������������������������������������������������������������������������������������� 95
Workspace Structure������������������������������������������������������������������������������������������������������������� 96
Security: Workspace Trust����������������������������������������������������������������������������������������������������� 97
Summary���������������������������������������������������������������������������������������������������������������������������������� 101

vii
Table of Contents

Chapter 5: Customizing Visual Studio Code��������������������������������������������������������� 103


Customizations and Extensions Explained�������������������������������������������������������������������������������� 103
Customizing Visual Studio Code������������������������������������������������������������������������������������������������ 105
Theme Selection������������������������������������������������������������������������������������������������������������������ 105
Customizing the Environment���������������������������������������������������������������������������������������������� 107
Customizing Keyboard Shortcuts���������������������������������������������������������������������������������������� 118
Creating Reusable Profiles�������������������������������������������������������������������������������������������������������� 123
Summary���������������������������������������������������������������������������������������������������������������������������������� 125

Chapter 6: Installing and Managing Extensions��������������������������������������������������� 127


Installing Extensions����������������������������������������������������������������������������������������������������������������� 127
Extension Recommendations���������������������������������������������������������������������������������������������� 131
Useful Extensions���������������������������������������������������������������������������������������������������������������� 133
Managing Extensions���������������������������������������������������������������������������������������������������������������� 134
Configuring Extensions�������������������������������������������������������������������������������������������������������� 136
Writing Your First Extension������������������������������������������������������������������������������������������������������ 138
Setting Up the Environment������������������������������������������������������������������������������������������������� 139
Creating an Extension���������������������������������������������������������������������������������������������������������� 140
Developing the Extension���������������������������������������������������������������������������������������������������� 142
Running the Extension��������������������������������������������������������������������������������������������������������� 145
Packaging Extensions��������������������������������������������������������������������������������������������������������� 147
Extension Development Summary�������������������������������������������������������������������������������������� 148
Summary���������������������������������������������������������������������������������������������������������������������������������� 149

Chapter 7: Source Control with Git����������������������������������������������������������������������� 151


Source Control in Visual Studio Code���������������������������������������������������������������������������������������� 151
Downloading Other Source Control Providers��������������������������������������������������������������������� 152
Managing Repositories������������������������������������������������������������������������������������������������������������� 153
Initializing a Local Git Repository���������������������������������������������������������������������������������������� 154
Creating a Remote Repository��������������������������������������������������������������������������������������������� 155
Handling File Changes�������������������������������������������������������������������������������������������������������������� 159
Staging Changes����������������������������������������������������������������������������������������������������������������� 160

viii
Table of Contents

Managing Commits������������������������������������������������������������������������������������������������������������������� 161


Working with the Git Command-Line Interface������������������������������������������������������������������������� 163
Creating and Managing Branches��������������������������������������������������������������������������������������������� 164
Switching to a Different Branch������������������������������������������������������������������������������������������ 166
Merging from a Branch�������������������������������������������������������������������������������������������������������� 166
Hints About Rebasing Branches������������������������������������������������������������������������������������������ 170
Deleting Branches��������������������������������������������������������������������������������������������������������������� 170
Adding Power to the Git Tooling with Extensions���������������������������������������������������������������������� 170
Git History���������������������������������������������������������������������������������������������������������������������������� 171
GitLens��������������������������������������������������������������������������������������������������������������������������������� 172
GitHub Pull Requests and Issues����������������������������������������������������������������������������������������� 174
Working with Azure DevOps������������������������������������������������������������������������������������������������������ 178
Creating a Team Project������������������������������������������������������������������������������������������������������ 178
Connecting Visual Studio Code to a Remote Repository����������������������������������������������������� 181
Summary���������������������������������������������������������������������������������������������������������������������������������� 182

Chapter 8: Automating Tasks������������������������������������������������������������������������������� 185


Understanding Tasks����������������������������������������������������������������������������������������������������������������� 185
Tasks Types������������������������������������������������������������������������������������������������������������������������� 186
Running and Managing Tasks���������������������������������������������������������������������������������������������� 187
The Default Build Task��������������������������������������������������������������������������������������������������������� 192
Auto-Detected Tasks������������������������������������������������������������������������������������������������������������ 192
Configuring Tasks���������������������������������������������������������������������������������������������������������������� 194
Running Files with a Default Program��������������������������������������������������������������������������������� 213
Summary���������������������������������������������������������������������������������������������������������������������������������� 213

Chapter 9: Building and Debugging Applications������������������������������������������������� 215


Creating Applications���������������������������������������������������������������������������������������������������������������� 215
The Status of Microsoft .NET����������������������������������������������������������������������������������������������� 216
Creating .NET Projects��������������������������������������������������������������������������������������������������������� 217
Creating Projects on Other Platforms���������������������������������������������������������������������������������� 223

ix
Table of Contents

Debugging Your Code���������������������������������������������������������������������������������������������������������������� 225


Configuring the Debugger��������������������������������������������������������������������������������������������������� 227
Managing Breakpoints�������������������������������������������������������������������������������������������������������� 230
Debugging an Application���������������������������������������������������������������������������������������������������� 231
Configuring Debug Options�������������������������������������������������������������������������������������������������� 237
Summary���������������������������������������������������������������������������������������������������������������������������������� 238

Chapter 10: Building Applications with Python���������������������������������������������������� 239


Chapter Prerequisites��������������������������������������������������������������������������������������������������������������� 239
Creating Python Applications����������������������������������������������������������������������������������������������� 241
Running Python Code���������������������������������������������������������������������������������������������������������� 243
Code Editing Features for Python���������������������������������������������������������������������������������������������� 250
Enhanced Word Completion with IntelliSense��������������������������������������������������������������������� 250
Understanding Function Parameters with Parameter Hints������������������������������������������������ 251
Quickly Retrieving Type Definitions������������������������������������������������������������������������������������� 251
Finding References�������������������������������������������������������������������������������������������������������������� 252
Renaming Symbols�������������������������������������������������������������������������������������������������������������� 253
Finding Code Issues with Linters����������������������������������������������������������������������������������������� 254
Advanced Code Editing with Pylance���������������������������������������������������������������������������������������� 257
Managing Pylance Settings������������������������������������������������������������������������������������������������� 260
Running Python Scripts������������������������������������������������������������������������������������������������������������� 261
Summary���������������������������������������������������������������������������������������������������������������������������������� 262

Chapter 11: Deploying Applications to Azure������������������������������������������������������� 263


Introducing Azure Extensions���������������������������������������������������������������������������������������������������� 263
Deploying Web Applications������������������������������������������������������������������������������������������������������ 265
Installing Extensions������������������������������������������������������������������������������������������������������������ 265
Signing In to Azure Subscriptions���������������������������������������������������������������������������������������� 266
Publishing Web Applications������������������������������������������������������������������������������������������������ 268
Creating and Deploying Azure Functions���������������������������������������������������������������������������������� 271
Configuring Visual Studio Code������������������������������������������������������������������������������������������� 271
Creating Azure Functions����������������������������������������������������������������������������������������������������� 273
Deploying Azure Functions�������������������������������������������������������������������������������������������������� 280
x
Table of Contents

Deploying Docker Images��������������������������������������������������������������������������������������������������������� 283


Docker Prerequisites����������������������������������������������������������������������������������������������������������� 284
Creating the Application Image������������������������������������������������������������������������������������������� 285
Uploading the Application Image to a Container Registry��������������������������������������������������� 287
Deploying the Docker Image to Azure��������������������������������������������������������������������������������� 290
Summary���������������������������������������������������������������������������������������������������������������������������������� 292

Chapter 12: Consuming AI Services��������������������������������������������������������������������� 295


Introducing Azure for AI������������������������������������������������������������������������������������������������������������� 296
General Considerations������������������������������������������������������������������������������������������������������������� 297
Introducing Computer Vision����������������������������������������������������������������������������������������������� 297
Setting Up Computer Vision Services���������������������������������������������������������������������������������������� 297
Retrieving the Service Keys������������������������������������������������������������������������������������������������� 302
Consuming AI Services with .NET��������������������������������������������������������������������������������������������� 304
Setting Up Variables and Constants������������������������������������������������������������������������������������ 306
Creating Authenticated Service Clients������������������������������������������������������������������������������� 308
Executing Image Analysis���������������������������������������������������������������������������������������������������� 309
Running the Application������������������������������������������������������������������������������������������������������ 313
Consuming AI Services with JavaScript������������������������������������������������������������������������������������ 315
Setting Up Variables and Constants������������������������������������������������������������������������������������ 317
Creating Authenticated Service Clients������������������������������������������������������������������������������� 318
Executing Image Analysis���������������������������������������������������������������������������������������������������� 319
Running the Application������������������������������������������������������������������������������������������������������ 322
Consuming AI Services with Python����������������������������������������������������������������������������������������� 323
Setting Up Variables and Constants������������������������������������������������������������������������������������ 324
Creating Authenticated Service Clients������������������������������������������������������������������������������� 325
Executing Image Analysis���������������������������������������������������������������������������������������������������� 326
Running the Application������������������������������������������������������������������������������������������������������ 329
Summary���������������������������������������������������������������������������������������������������������������������������������� 330

Index��������������������������������������������������������������������������������������������������������������������� 331

xi
About the Author
Alessandro Del Sole is a senior software engineer for a
healthcare company, building mobile apps for doctors and
dialysis patients. He has been in the software industry for
more than 20 years, focusing on Microsoft technologies
such as .NET, C#, Visual Studio, and Xamarin. He has been
a trainer, consultant, and a Microsoft MVP since 2008 and
is the author of many technical books. He is a Xamarin
Certified Mobile Developer, Microsoft Certified Professional,
and a Microsoft Programming Specialist in C#.

xiii
Acknowledgments
Thanks to Smriti Srivastava, Nirmal Selvaraj, Laura Berendson, and everyone else at
Apress for the opportunity, renewed trust, and the great teamwork on this book.
Special thanks to the technical editor Damien Foggon, who contributed to the
quality and accuracy of the content.
Special thanks to my wife Angelica, for her continuous and strong support.

xv
Introduction
One of the most common requirements in software development today is building
applications and services that run on multiple systems and devices, especially with the
continued expansion of cloud and artificial intelligence services, and of architectures
based on microservices.
Developers have many options for building cross-platform and cross-device
software, from languages to development platforms and tools. However, in most cases,
such tools rely on proprietary systems, which result in strong dependencies. Moreover,
most development tools target specific platforms and development scenarios. Microsoft
Visual Studio Code takes a step forward by providing a fully featured development
environment for Windows, macOS, and Linux that offers not only advanced coding
features but also integrated tools. These tools span across the entire application lifecycle,
from coding to debugging to team collaboration. The full tooling is consistent across
these languages and frameworks, natively or via extensions, so that developers share the
same experience regardless of the technology they use.
With .NET 7 and with .NET MAUI recently released, and with artificial intelligence
services becoming part of the modern software implementation, Visual Studio Code
becomes even more important to support cross-platform development on multiple
operating systems. In this book, developers with any skill level learn how to leverage
Visual Studio Code to target scenarios such as web, cloud, and mobile development
using the programming language of their choice. This book provides guidance on
building apps for any system and any device. This includes managing the application
lifecycle, as well as team collaboration.

xvii
CHAPTER 1

Introducing Visual Studio


Code
Visual Studio Code is not just another evolved notepad with syntax colorization and
automatic indentation. Instead, it is a very powerful, code-focused development
environment expressly designed to make it easier to write web, mobile, and cloud
applications using languages that are available in different development platforms. It
supports the application development lifecycle with a built-in debugger and integrated
support for the popular Git version control engine.
With Visual Studio Code, you can work with individual code files or with folders
containing projects or loose files. This chapter provides an introduction to Visual Studio
Code, giving you information on when and why you should use it. It includes details
about installing and configuring the program on the different supported operating
systems.

Note In this book, I refer to the product using its full name, Visual Studio Code, as
well as its friendly names, VS Code and Code, interchangeably.

 isual Studio Code, a Cross-Platform


V
Development Tool
Visual Studio Code is the first cross-platform development tool in the Microsoft Visual
Studio family that runs on Windows, Linux, and macOS. It is a free, open-source
(https://github.com/microsoft/vscode), code-centric tool. This not only makes
editing code files and folder-based project systems easier, but also facilitates writing
cross-platform web, mobile, and cloud applications in the most popular platforms, such

1
© Alessandro Del Sole 2023
A. Del Sole, Visual Studio Code Distilled, https://doi.org/10.1007/978-1-4842-9484-0_1
Discovering Diverse Content Through
Random Scribd Documents
See brudder’s funny face, baby?
Slim
[Coming out, and speaking with boundless contempt.]
Dat’s de last time I tackle a job along wit’ a fambly man!
Bessie
Bill, yuh promised us a Christmas tree!
Pete
An’ we knowed yuh’d get us one!
Annie
Yuh said yuh was gonna get one, didn’t yuh, Bill?
Maggie
So we folleyed yuh all de way—
Pete
Yuh couldn’t lose us, Bill!
Annie
Not on yer life!
Pete
We wanted dat tree!
T’eodore
[A grand climax.]
An’ here it is!
[There is a chorus of delighted screams as the children
surround the tree.]
Bessie
Bill, what a peach of a tree!
Pete
Some tree!
Annie
Lookit de presents!
T’eodore
Golly, lookit de presents!
Maggie
See de boo-ful tree, baby?
[She makes the baby clap its hands.]
David
[Puzzled, as the children, shrilling their delight, descend
upon the gifts.]
Say, Santa Claus, I didn’t know you had a family.
Slim
[With infinite disgust.]
Kid, yuh said a mout’ful!
David
Are they all related to you?
Bill
[Not too modestly.]
Me eight brudders an’ sisters—count ’em. Bessie—an’ Pete—dey’re
twins. An’ Maggie—dat’s her holdin’ de baby—an’ T’eodore—an’
Annie—an’ Grover—an’ Woodrow—an’ Calvin—dat’s de baby.
David
Do they all come from the North Pole?
Bessie
[With injured American pride.]
W’at do yuh t’ink? We’re a lot of Polanders?
Bill
De Nort’ Pole? De Nort’ Pole’s warm next to w’ere dey come from.
My paw ain’t woikin’, an’ de landlord toined off de heat w’en I didn’t
pay de rent.
David
Rent? What’s rent?
Slim
[As Bill gazes appealingly at him.]
Yuh started dis. Yuh tell him.
Bill
Rent? Rent’s somethin’ yuh pay w’en yuh get money.
David
And when you don’t get it?
Bill
Yuh don’t.
Slim
[Becoming impatient.]
Say, what I wanna know is dis: is dis a kidnapin’ party, or is dis a kid
party?
David
What’s a kidnaping party, Santa Claus?
Bill
I’ll show yuh.
[He calls to the children.]
Hey, fellers, we’re gonna beat it.
Pete
Naw!
Bessie
We don’t wanna go, Bill.
Annie
We wanna play wit’ de presents!
T’eodore
Lookit de sleds!
Pete
An’ de boxin’ gloves!
Annie
An’ de railroad trains!
Bessie
An’ de trumpets!
Maggie
See de pretty flowers, baby?
Pete
[Parceling out the musical instruments.]
Yuh take dis—and yuh take dis—an’ w’en I say “Ready,” yuh all blow
to onct.
Slim
[Anxiously.]
Nuttin’ doin’!
Pete
Ready!
[The din is terrific.]
David
[Indicating the instruments with some anxiety, and pulling
Bill’s sleeve.]
Santa Claus, they haven’t been boiled!
Slim
W’at?
David
They haven’t been boiled, Mr. Slim!
Slim
[And you know he means the children—not the toys.]
Dey oughta be!
Pete
All ready? Go!
[The uproar is repeated.]
Slim
[To Bill.]
An’ I told yuh not to make a sound!
Bill
Say, kid, dere ain’t nobody else on dis floor, is dere?
David
No—nobody but us.
Bill
[Drawing a sigh of relief.]
Dat’s good. Now, fellers, we’re gonna go—
Slim
[Interrupting.]
An’ we’re gonna take him—
[He indicates David.]
along with us.
Bessie
W’at’s de hurry, Bill?
Pete
We don’t wanna go!
T’eodore
Not now!
Bessie
Bill, dere’s no place fer us to go to.
Bill
W’at do yuh mean?
Pete
De landlord, he come along w’ile we was leavin’, an’ he says we
needn’t come back—none of us—never.
Bessie
[Rather pleased with her news.]
He says he’ll put de furniture on de sidewalk, an’ yuh can git it
w’enever yuh like.
Pete
De sooner de better, he says.
Bessie
Yea—an’ dat wasn’t all he says!
Bill
[Aghast.]
He trun yuh out de moment my back was toined?
Bessie
Yuh bet he did!
Bill
He trun yuh out? He trun yuh out?
Bessie
Dat’s w’at I’m tellin’ yuh.
Bill
An’ what did paw say?
Bessie
Paw says ef yuh can’t support him in better style den dat, he’s gonna
quit yuh cold.
Bill
W’at do yuh t’ink of dat, Slim? Ain’t it de limit? Ain’t dat de absoloot
limit?
David
[Seizing Bill’s hand.]
What’s the matter, Santa Claus?
Bill
[Angrily.]
Aw, nuttin’!
David
Why don’t you tell me, Santa Claus?
Bill
[Bitterly.]
Dere’s nuttin’ de matter—on’y de kids ain’t gonna have a roof over
deir heads to-night!
David
Because you didn’t get money?
Bill
Dat’s w’y.
David
And because you didn’t pay the rent?
Bill
Yuh said it, kid.
David
But why do you want a roof over their heads? Can’t we take them
along with us?
Bill
W’at’s dat?
David
They can come to the North Pole too, can’t they? Of course it will be
a little crowded in the sleigh, but there’ll be room for all of us if we sit
close. And we’ll have lots of fun!
Slim
[Meaningly.]
Do yuh hear dat, Bill?
David
[Eagerly.]
The reindeer are waiting outside!
Slim
Aroun’ de corner.
David
Dancer and Prancer, and Blixen and Vixen—
Bill
[Interrupting.]
De reindeer’s name is Lizzie—an’ her radiator’s froze.
Slim
[Crossing to him earnestly.]
But it’s gonna get us away from here, Bill! We get outa de city—we
go somew’eres in de Bronx—an’ den we give Millman a ring on de
telephone—
David
Don’t telephone daddy; he’s always busy.
Slim
He won’t be busy dis time.
[He argues with Bill.]
David
You don’t know my daddy! My daddy is the busiest man in the world!
When he comes to see me, he says, “Exactly ten”—and that means
exactly ten. When I want to see him I have to ask his secretary—and
sometimes he can’t see me at all.
Bessie
Do yuh like dat?
David
I don’t like it—but I guess daddy has to work.
Bessie
Your daddy woik? W’at fer?
David
I guess he wants his money—so that he can pay his rent.
[Bessie snickers. David bridles indignantly.]
Don’t make fun of him! I won’t let anybody do that! I don’t think
anybody works as hard as he works! Why, he starts in the morning
before I get up, and sometimes when I wake in the middle of the
night, I tiptoe to the door of my room, and I can see the light burning
in his study downstairs! Daddy works hard—and he looks so tired!
He’s so tired sometimes that he won’t let me sit in his lap.
Bessie
My daddy lets me sit in his lap all I like!
David
[Eagerly.]
Does everybody call him a fine man?
Bessie
[A bit dubiously.]
Dey calls him all sorts of t’ings—but he don’t mind dat.
David
Do the policemen stop and speak to him?
Bessie
Not ef he sees dem foist.
David
Do they send men to his house to take his picture?
Bessie
[With pardonable pride.]
Dey don’t have ter: dey got his pitcher at headquarters.
Bill
[Who has been arguing with Slim in undertones during the
preceding dialogue, now turns abruptly.]
Come on, fellers! We’re gonna go!
[Slim takes David’s hand.]
A Chorus
Naw, Bill!... We wanna play wit’ de presents!... We don’t wanna leave
de presents!... We want de presents!
Bill
[Angrily.]
Come on, I say!
Maggie
[Appealingly.]
Baby don’t wanna leave de presents!
David
Santa Claus, let them take the presents with them!
[As Slim releases him in astonishment, he runs to the
children.]
Here: you take this, and here’s something for you; and you take one
of the railroad trains—don’t forget the tracks—and you take the other
one.
Bill
[Dumbfounded.]
Yuh’re givin’ away yer toys?
David
[Busy distributing gifts.]
They want them more than I do!
[He turns again to the children.]
Here: you can carry more than that!
[Annie’s arms are full already, but he piles toys on the
heap.]
Put these on top. Take them along.
[To Pete.]
Do they let you ride a bicycle?
Pete
Sure t’ing!
David
Then take this one.
[To Bessie.]
Do they let you go coasting on a sled?
Bessie
All I want—ef I gotta sled.
David
Here’s one for you.
[To T’eodore, holding up a pair of boxing gloves.]
Can you use them?
T’eodore
Kin a duck swim?
David
Take them.
Pete
[To Bill.]
Hey, Bill, can I have de tennis racket?
Bill
[To David.]
How about it?
David
[And you see it hurts—and besides Pete’s arms are full.]
He wants it more than I do.
Maggie
[With a cry of delight.]
Gee, look w’at I found! Ice skates! See de ice skates, baby?
David
Ice skates!
[He pauses; takes them in his hand; caresses them. This
time it hurts very much indeed.]
Bill
[Almost savagely.]
W’at are yuh gonna do, kid?
David
[Smiling at Bill.]
I’m going to give them to her.
[He places them in Maggie’s hands.]
Take good care of them—and look out for the baby—they’re sharp.
[He turns to Bill.]
And now, Santa Claus, what’s a kidnaping party?
Bill
Yuh wanna know dat?
David
Yes, Santa Claus!
Bill
Yuh really wanna know?
[David takes his hand and nods eagerly. Bill hesitates.
Then he glares defiantly at Slim, and turns to David.]
Kid, yuh ain’t never gonna loin dat from me!
Slim
[With hostility.]
W’at did yuh say?
David
[Apologetically.]
I didn’t mean to forget your present, Mr. Slim.
[He runs to the tree and fetches the candy.]
Here you are! And Merry Christmas!
[He gives Slim the box.]
Slim
De candy! Dat’s my idee of one fine present!
David
And now, Santa Claus?
Bill
[Shaking his head.]
Kid, it’s gonna cost me a lotta coin—an’ gee, w’at wouldn’t I do wit’
just a coupla dollars?—but youse a little gen’leman—see?—an’ ef
anybody lays a finger on yuh, I’ll moider him!
[He casts a defiant glance at Slim, and claps his arm upon
David’s shoulders in a rough accolade.]
Kid, youse a good sport—
[He bows grotesquely.]
—an’ I take me hat off to yuh! Yours truly, John W. Santa.
Slim
[Gasping.]
Youse gonna leave him here?
Bill
Yuh hoid me.
Slim
But we come here to—
Bill
[Interrupting.]
I changed my mind—see? A guy dat’s a he-man can do dat little t’ing
—an’ John W. Santa’s a he-man!
[He indicates David.]
I’m gonna leave him here—an’ me an’ de kids is gonna beat it—an’
youse is comin’ along, too; don’t yuh forget dat!
Slim
Bill! Yuh said yuh was hard-boiled!
Bill
[Crossing to him menacingly.]
Ef yuh don’t believe it, now’s de time to try me!
[He pauses.]
Well?
[There is a sudden loud knocking at the locked door at the
right.]
Halligan
[Outside.]
Let me in! Let me in or I’ll break down the door!
Slim
Beat it!
[There is a rush for the windows, but it stops short as the
door at the left, which has been ajar for some
moments, suddenly opens, and Millman stands on
the threshold.]
Bill
[Rising nobly to the occasion.]
A-choo!
David
God bless you!
Slim
We’re pinched!
Millman
[Quietly.]
Just that.
Slim
[Jerking his thumb toward the window.]
Cops outside?
Millman
[Nodding.]
They saw you come in. They’ve been waiting for you to come out.
Annie
[Beginning to cry.]
I want my presents!
Halligan
[Hammering at the door again.]
Let me in!
Millman
Let him in.
[Bill crosses to the door and unlocks it. Halligan and
Vicky, both wabbly, but on their feet again, come into
the room.]
Vicky
Master David! Master David! They haven’t hurt you, have they?
[She rushes to him.]
David
Santa Claus wouldn’t hurt anybody. He was going to give me a
kidnaping party, that was all.
[He pats Bill’s hand.]
Vicky
[Horrified.]
Master David!
Halligan
[Producing a whistle.]
Shall I whistle for the police, sir?
Millman
Wait, Halligan.
[He turns to the intruders.]
The house is surrounded. There is no way you can get out.
Bill
[Most unhappily.]
Yes, sir.
[He takes off his mask. For the first time we see his face:
the face of a half-starved lad with big eyes.]
Millman
Bear that in mind.
[Most unaccountably, most leisurely, he turns his back on
Bill, and draws up a chair.]
Davy, how would you like to sit in my lap?
David
I’d love it, Daddy!
Millman
So would I.
[David rushes to him. Millman settles him comfortably,
quite oblivious of the others.]
There. There. David, where were you going with this man?
David
Not “this man,” Daddy: it’s Santa Claus.
Millman
I meant Santa Claus.
David
I was just going to the North Pole.
Millman
Were you going to leave me alone?
David
I would have come back to-morrow or the next day, Daddy—if you
wanted me.
Millman
[Eloquently.]
If I wanted you!
[He pauses.]
Are you sure you would have come back, Davy?
David
Well, pretty sure.
[He hesitates.]
I wouldn’t want to bother you if you were busy.
Millman
[Wincing.]
I’m not so busy as you think, Davy.
David
No?
Millman
No.
[He pauses.]
Sometimes, when a man’s lonely—when he misses somebody who’s
gone terribly, terribly much—he tries to make himself busy. Do you
understand that, Davy?
David
I think I do. You mean—Mummy.
Millman
I mean—Mummy.
[His voice lightens.]
But now that my little boy is growing older, I don’t expect to be nearly
so busy any more.
David
[Ecstatically.]
Really, Daddy?
Millman
Honest and truly!
David
[Turning to Bill.]
Did you hear that, Santa Claus?
[Bill shuffles his feet and does not answer.]
Millman
[Sharply.]
Did you hear that, Santa Claus?
Bill
Yes, sir. I hoid him.
Millman
[Trying to speak lightly.]
And now, if you still want to go to the North Pole with Santa Claus—
you may go.
[He pauses.]
Do you want to go?
David
[Hesitates; rises; looks at his father; looks at Bill—and
then, to his father’s unutterable horror, runs to Bill.]
You won’t mind, will you, Santa Claus?
[Bill is silent.]
Millman
[In a tone like that of a whiplash.]
Answer him!
Bill
[Addressing David, and exceedingly gruff.]
W’at do yuh mean, kid?
David
You won’t mind if I stay here, will you? I don’t care so much about
that old North Pole.
Welcome to our website – the ideal destination for book lovers and
knowledge seekers. With a mission to inspire endlessly, we offer a
vast collection of books, ranging from classic literary works to
specialized publications, self-development books, and children's
literature. Each book is a new journey of discovery, expanding
knowledge and enriching the soul of the reade

Our website is not just a platform for buying books, but a bridge
connecting readers to the timeless values of culture and wisdom. With
an elegant, user-friendly interface and an intelligent search system,
we are committed to providing a quick and convenient shopping
experience. Additionally, our special promotions and home delivery
services ensure that you save time and fully enjoy the joy of reading.

Let us accompany you on the journey of exploring knowledge and


personal growth!

ebookmass.com

You might also like